Skip to content

Commit

Permalink
Merge pull request #1 from lacchain/cmake_patch
Browse files Browse the repository at this point in the history
Split binary and development packages
  • Loading branch information
diega authored Jul 29, 2020
2 parents 2420351 + 04cf2d9 commit 8e324f4
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
output/
.DS_Store
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN echo '#!/bin/sh\n\
set -x\n\
cd /build/liboqs-0.3.0\n\
debuild -b -uc -us -nc\n\
mv ../liboqs_0.3.0_amd64.deb /output\n'\
mv ../*.deb /output\n'\
>> /run.sh

RUN chmod +x /run.sh
Expand Down
19 changes: 18 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Vcs-Browser: https://github.com/open-quantum-safe/liboqs/
Vcs-Git: https://github.com/open-quantum-safe/liboqs.git

Package: liboqs
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Expand All @@ -19,3 +18,21 @@ Description: Open source library for quantum-safe cryptographic algorithms.
cryptography to facilitate deployment and testing in real world contexts.
.
In particular, OQS provides prototype integrations of liboqs into TLS and SSH, through OpenSSL and OpenSSH.
.
This package contains the shared library object.

Package: liboqs-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}, ${shlibs:Depends}, liboqs (= ${binary:Version})
Description: Open source library for quantum-safe cryptographic algorithms.
This package is part of the Open Quantum Safe (OQS) project led by Douglas Stebila
and Michele Mosca, which aims to develop and integrate into applications quantum-safe
cryptography to facilitate deployment and testing in real world contexts.
.
In particular, OQS provides prototype integrations of liboqs into TLS and SSH, through OpenSSL and OpenSSH.
.
This package provides development files.

2 changes: 2 additions & 0 deletions debian/liboqs-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/include/*

1 change: 1 addition & 0 deletions debian/liboqs.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/lib/*/lib*.so.*
3 changes: 3 additions & 0 deletions debian/liboqs.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
liboqs.so.0 liboqs #MINVER#
* Build-Depends-Package: liboqs-dev

24 changes: 24 additions & 0 deletions debian/patches/cmake_to_gnu_install_dirs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,8 @@ include(.CMake/compiler_opts.cmake)

include(.CMake/alg_support.cmake)

+include(GNUInstallDirs)
+
if(OQS_USE_OPENSSL)
if(NOT DEFINED OPENSSL_ROOT_DIR)
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -94,8 +94,8 @@ set_target_properties(oqs
add_library(OQS::oqs ALIAS oqs)

install(TARGETS oqs
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(FILES ${PUBLIC_HEADERS}
DESTINATION include/oqs)
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cmake_to_gnu_install_dirs.patch
8 changes: 6 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/usr/bin/make -f
#export DH_VERBOSE = 1
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
dh $@
dh $@

override_dh_auto_configure:
dh_auto_configure -- \
-DBUILD_SHARED_LIBS="ON"
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 8e324f4

Please sign in to comment.