Commit 67f5686b authored by ale's avatar ale

Update Debian packaging to use 'dh'

Will run tests in the package build phase.
parent 02d83bf6
debian/tmp/usr/lib/python*
debian/tmp/usr/lib/libsso*
debian/tmp/etc/sso
ai-sso (2.3.0) unstable; urgency=medium
* Added support for nonces in login exchange.
* Dropped Python sso server (ai-sso-server), replaced by
git.autistici.org/id/go-sso.
* Slightly more modern Debian packaging.
-- Autistici/Inventati <debian@autistici.org> Sat, 22 Jun 2019 12:15:18 +0100
ai-sso (2.2.0) unstable; urgency=medium
* Add apache2.4 support
......
......@@ -2,8 +2,8 @@ Source: ai-sso
Section: net
Priority: extra
Maintainer: Autistici/Inventati <debian@autistici.org>
Build-Depends: debhelper (>= 5), apache2-dev | apache2-prefork-dev | apache2-threaded-dev,
autoconf, automake, libtool, python-dev, dh-python, python-all, swig,
Build-Depends: debhelper (>= 10), apache2-dev | apache2-prefork-dev | apache2-threaded-dev,
autoconf, automake, libtool, python-dev, dh-python, python-all,
libpam-dev, python-setuptools, python-flup, pkg-config, libz-dev,
python-m2crypto
Standards-Version: 3.7.2
......@@ -20,14 +20,6 @@ Depends: ai-sso, ${python:Depends}
Description: A/I SSO Python modules.
Python bindings for the SSO library.
Package: ai-sso-server
Architecture: all
Depends: ai-sso, ai-sso-python, python-flask, gunicorn,
python-setproctitle, lsb-base, adduser, python-m2crypto,
python-beautifulsoup, ${python:Depends}
Description: A/I SSO Server.
The login server for the A/I SSO service.
Package: libapache2-mod-sso
Architecture: any
Depends: ai-sso, apache2-api-20120211
......
debian/tmp/usr/lib/apache2/modules/
debian/tmp/etc/apache2/
debian/tmp/lib/security/pam_sso.so
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
%:
dh $@
override_dh_auto_configure:
sh autogen.sh
./configure --prefix=/usr --with-pam-dir=/lib/security --enable-pam-sso --enable-mod-sso --enable-shared
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE)
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
-$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# ai-sso
install -d $(CURDIR)/debian/ai-sso/etc/sso
install -d $(CURDIR)/debian/ai-sso/usr/lib/apache2/modules
$(MAKE) install DESTDIR=$(CURDIR)/debian/ai-sso
# ai-sso-python
install -d $(CURDIR)/debian/ai-sso-python/usr/lib
mv -f $(CURDIR)/debian/ai-sso/usr/lib/python* $(CURDIR)/debian/ai-sso-python/usr/lib/
# ai-sso-server
install -d $(CURDIR)/debian/ai-sso-server/etc/sso
install -o root -g root -m 644 debian/ai-sso-server.config-dist \
$(CURDIR)/debian/ai-sso-server/etc/sso/config.dist
install -o root -g root -m 644 debian/ai-sso-server_logging.conf \
$(CURDIR)/debian/ai-sso-server/etc/sso/logging.conf
install -d $(CURDIR)/debian/ai-sso-server/usr/sbin
/bin/echo -e "#!/usr/bin/python\nfrom sso_server.main import main\nmain()" > \
$(CURDIR)/debian/ai-sso-server/usr/sbin/sso_server
chmod 0755 $(CURDIR)/debian/ai-sso-server/usr/sbin/sso_server
# libapache2-mod-sso
install -d $(CURDIR)/debian/libapache2-mod-sso/usr/lib/apache2/modules
mv $(CURDIR)/debian/ai-sso/usr/lib/apache2/modules/mod_sso.so \
$(CURDIR)/debian/libapache2-mod-sso/usr/lib/apache2/modules/mod_sso.so
rm -fr $(CURDIR)/debian/ai-sso/usr/lib/apache2
install -d $(CURDIR)/debian/libapache2-mod-sso/etc/apache2/mods-available
override_dh_auto_install:
install -d $(CURDIR)/debian/tmp/etc/sso
install -d $(CURDIR)/debian/tmp/usr/lib/apache2/modules
install -d $(CURDIR)/debian/tmp/etc/apache2/mods-available
install -m 644 -o root -g root $(CURDIR)/debian/mod_sso.conf \
$(CURDIR)/debian/libapache2-mod-sso/etc/apache2/mods-available/sso.conf
$(CURDIR)/debian/tmp/etc/apache2/mods-available/sso.conf
install -m 644 -o root -g root $(CURDIR)/debian/mod_sso.load \
$(CURDIR)/debian/libapache2-mod-sso/etc/apache2/mods-available/sso.load
# libpam-sso
install -d $(CURDIR)/debian/libpam-sso/lib/security
cp -L $(CURDIR)/debian/ai-sso/lib/security/pam_sso.so.0.0.0 \
$(CURDIR)/debian/libpam-sso/lib/security/pam_sso.so
-rm -fr $(CURDIR)/debian/ai-sso/lib
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
$(CURDIR)/debian/tmp/etc/apache2/mods-available/sso.load
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installlogrotate
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_pysupport
dh_python2 --no-guessing-versions
dh_installinit
dh_systemd_enable
dh_systemd_start
# dh_installcron
# dh_installinfo
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb
#dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_auto_install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
mv $(CURDIR)/debian/tmp/lib/security/pam_sso.so.0.0.0 \
$(CURDIR)/debian/tmp/lib/security/pam_sso.so
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment