diff --git a/.gitignore b/.gitignore index 70bde89..6d1deeb 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,10 @@ pin.log .idea .cache __pycache__ + +debian/.debhelper/ +debian/debhelper-build-stamp +debian/files +debian/*.substvars +debian/sio2jail/ +obj-*/ diff --git a/CMakeLists.txt b/CMakeLists.txt index d483fdf..3c694da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,8 @@ ENDIF() IF(NOT DEFINED ARCH) SET(ARCH "NATIVE") ENDIF() -IF(NOT ARCH MATCHES "i386|x86_64|NATIVE") - MESSAGE(FATAL_ERROR "ARCH should be one of i386, x86_64, NATIVE") +IF(NOT ARCH MATCHES "i386|x86_64|amd64|NATIVE") + MESSAGE(FATAL_ERROR "ARCH should be one of i386, amd64, NATIVE") ENDIF() IF(NOT DEFINED WITH_CLANG_TIDY) @@ -43,7 +43,7 @@ ENDIF() IF(ARCH STREQUAL "i386") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") -ELSEIF(ARCH STREQUAL "x86_64") +ELSEIF(ARCH MATCHES "amd64|x86_64") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") ENDIF() diff --git a/README.md b/README.md index a0bc3b0..f56566e 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ option (STATIC by default): There is also a possibility to control whether output binary should run on other architecture than the default one (or force given architecture): - -DARCH=i386|x86_64 + -DARCH=i386|amd64 Note, that when using ARCH other than build host architecture it may be necessary (depending on libraries installation) to build sio2jail with custom libseccomp (more diff --git a/debian/README b/debian/README new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/debian/README @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..0a24153 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +sio2jail (1.3.1) UNRELEASED; urgency=medium + + * Initial Release. + + -- Michał Sidor Sun, 12 Jan 2020 15:24:25 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..913d41d --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: sio2jail +Section: utils +Priority: optional +Maintainer: Michał Sidor +Build-Depends: debhelper (>= 11), cmake +Standards-Version: 4.1.3 +Homepage: https://github.com/sio2project/sio2jail +Vcs-Browser: https://github.com/sio2project/sio2jail +Vcs-Git: https://github.com/sio2project/sio2jail.git + +Package: sio2jail +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A tool for supervising execution of programs submitted in algorithmic competitions diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ed5831f --- /dev/null +++ b/debian/rules @@ -0,0 +1,28 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ --buildsystem=cmake + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +override_dh_auto_configure: + dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DARCH=$(DEB_TARGET_ARCH) + +override_dh_auto_test: + echo Tests skipped + diff --git a/debian/sio2jail-docs.docs b/debian/sio2jail-docs.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/debian/sio2jail-docs.docs @@ -0,0 +1 @@ +README diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index d020991..b2cc465 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -4,4 +4,4 @@ ADD_CUSTOM_COMMAND(OUTPUT sio2jail.1 ADD_CUSTOM_TARGET(doc ALL DEPENDS sio2jail.1 scdoc) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sio2jail.1 DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}") +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sio2jail.1 DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1")