diff --git a/.gitignore b/.gitignore index 378eac2..a777f81 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,9 @@ build + +# debian build artifacts +debian/*.debhelper.log +debian/*.substvars +debian/.debhelper/ +debian/files +debian/libscitokens*/ +debian/tmp/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e44401..4dfeedc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required( VERSION 2.6 ) project( scitokens-cpp ) +include(GNUInstallDirs) + option( BUILD_UNITTESTS "Build the scitokens-cpp unit tests" OFF ) set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ) @@ -66,14 +68,6 @@ target_link_libraries(scitokens-list-access SciTokens) add_executable(scitokens-create src/create.cpp) target_link_libraries(scitokens-create SciTokens) -if (NOT DEFINED LIB_INSTALL_DIR) - SET(LIB_INSTALL_DIR "lib") -endif() - -if (NOT DEFINED INCLUDE_INSTALL_DIR) - SET(INCLUDE_INSTALL_DIR "include") -endif() - if( BUILD_UNITTESTS ) include(ExternalProject) @@ -88,11 +82,11 @@ endif() install( TARGETS SciTokens - LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) install( FILES src/scitokens.h - DESTINATION ${INCLUDE_INSTALL_DIR}/scitokens ) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/scitokens ) set_target_properties( SciTokens diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..43eb68b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +scitokens-cpp (0.5.1-1) unstable; urgency=low + + * first debian packaging + + -- Duncan Macleod Fri, 11 Dec 2020 10:18:00 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..211ed86 --- /dev/null +++ b/debian/control @@ -0,0 +1,39 @@ +Source: scitokens-cpp +Section: science +Priority: optional +Maintainer: Derek Weitzel +Standards-Version: 4.4.1 +Vcs-Browser: https://github.com/scitokens/scitokens-cpp +Vcs-Git: https://github.com/scitokens/scitokens-cpp.git +Homepage: https://github.com/scitokens/scitokens-cpp +Build-Depends: + debhelper (>=9), + cmake (>=2.6), + libcurl4-openssl-dev | libcurl4-gnutls-dev, + libssl-dev, + libsqlite3-dev, + pkg-config, + uuid-dev, + +Package: libscitokens0 +Architecture: any +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Description: C++ Implementation of the SciTokens Library + This package provides the shared object libraries needed to run applications + that use the SciTokens C++ library. + +Package: libscitokens-dev +Section: libdevel +Architecture: any +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + libcurl4-openssl-dev | libcurl4-gnutls-dev, + libscitokens0 (= ${binary:Version}), + libssl-dev, + libsqlite3-dev, +Description: Header files for the scitokens-cpp public interfaces + This package provides the files needed to build applications + that use the SciTokens C++ library. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..e58cd10 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,25 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: scitokens-cpp +Upstream-Contact: Derek Weitzel +Source: https://github.com/scitokens/scitokens-cpp + +Files: * +Copyright: 2019-2020, HTCondor Team, Computer Sciences Department, + University of Wisconsin-Madison, WI. +License: Apache-2.0 + +Files: debian/* +Copyright: 2020, Cardiff University +License: Apache-2.0 + +License: Apache-2.0 + This file is licensed under the terms of the Apache License Version 2.0 + http://www.apache.org/licenses. This notice must appear in modified or not + redistributions of this file. + . + Redistributions of this Software, with or without modification, must + reproduce the Apache License in: (1) the Software, or (2) the Documentation + or some other similar material which is provided with the Software (if any). + . + On Debian systems, the full text of the Apache License version 2 can be found + in the file `/usr/share/common-licenses/Apache-2.0'. diff --git a/debian/libscitokens-dev.install b/debian/libscitokens-dev.install new file mode 100644 index 0000000..4f9f064 --- /dev/null +++ b/debian/libscitokens-dev.install @@ -0,0 +1,2 @@ +usr/lib/*/*.so +usr/include/* diff --git a/debian/libscitokens0.install b/debian/libscitokens0.install new file mode 100644 index 0000000..3de3b10 --- /dev/null +++ b/debian/libscitokens0.install @@ -0,0 +1 @@ +usr/lib/*/*.so.* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1a507b7 --- /dev/null +++ b/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +export DH_VERBOSE = 1 + +%: + dh $@ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)