Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,24 @@ target_link_libraries(cpackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES})

DEAL_II_SETUP_TARGET("${PROJECT_NAME}")
DEAL_II_SETUP_TARGET(cpackexamplelib)

include(GNUInstallDirs)

install(TARGETS cpackexample
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(TARGETS cpackexamplelib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

install(FILES
filesystem/filesystem.hpp
fem/fem.hpp
flatset/flatset.hpp
yamlParser/yamlParser.hpp
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cpackexamplelib
)

include(cmake/CPackConfig.cmake)
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ RUN apt-get -qq update && \
vim \
tree \
lintian \
unzip

# Get, unpack, build, and install yaml-cpp
RUN mkdir software && cd software && \
wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.6.3.zip && unzip yaml-cpp-0.6.3.zip && \
cd yaml-cpp-yaml-cpp-0.6.3 && mkdir build && cd build && \
cmake -DYAML_BUILD_SHARED_LIBS=ON .. && make -j4 && make install

unzip \
libyaml-cpp-dev

# This is some strange Docker feature. Normally, you don't need to add /usr/local to these
ENV LIBRARY_PATH $LIBRARY_PATH:/usr/local/lib/
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib/
Expand Down
15 changes: 15 additions & 0 deletions cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "Megha Darda")
set(CPACK_PACKAGE_CONTACT "meghardarda@gmail.com")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CPack exercise SSE")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/megha-darda/cpack-exercise-wt2526")
set(CPACK_GENERATOR "TGZ;DEB")

set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Megha Darda <meghardarda@gmail.com>")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "This is for CPack exercise SSE")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)

set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES ON)

include(CPack)
19 changes: 19 additions & 0 deletions lintian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Before
lintian ./cpackexample_0.1.0_amd64.deb
running with root privileges is not recommended!
E: cpackexample: description-synopsis-is-duplicated line 1
E: cpackexample: malformed-contact Maintainer Megha
E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package)
E: cpackexample: no-copyright-file
E: cpackexample: unstripped-binary-or-object [usr/bin/cpackexample]
W: cpackexample: no-manual-page [usr/bin/cpackexample]



-- After
lintian ./cpackexample_0.1.0_amd64.deb
running with root privileges is not recommended!
E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package)
E: cpackexample: no-copyright-file
W: cpackexample: no-manual-page [usr/bin/cpackexample]
root@799880555f08:/mnt/cpack-exercise/build#