]> mj.ucw.cz Git - subauth.git/commitdiff
Debian packaging: init
authorMartin Mares <mj@ucw.cz>
Fri, 11 Aug 2017 15:58:22 +0000 (17:58 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 11 Aug 2017 15:58:22 +0000 (17:58 +0200)
16 files changed:
Makefile
apache/Makefile
apache/mod_authn_subauth.conf [new file with mode: 0644]
apache/mod_authn_subauth.load [new file with mode: 0644]
client/Makefile
debian/README [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/libapache2-mod-subauth.apache2 [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/subauth.service [new file with mode: 0644]
pam/Makefile
server/Makefile

index 71af79bcd9c6118ed5b4dc82faceb8bcd308bc46..4f71f76986d688c4ddf19bab1696b7a1bf9f4402 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,9 @@ EXTRA_RUNDIRS=run
 CFLAGS+=$(LIBUCW_CFLAGS) $(LIBUCW_JSON_CFLAGS)
 LIBS+=$(LIBUCW_LIBS) $(LIBUCW_JSON_LIBS)
 
+install::
+.PHONY: install
+
 include $(s)/server/Makefile
 include $(s)/client/Makefile
 include $(s)/pam/Makefile
index 4383fe506167eb462c51d3703a4f501dae7514e7..022b70c8ccec91296f237c3da5785aaa719d0350 100644 (file)
@@ -9,9 +9,8 @@ $(o)/apache/mod_authn_subauth.so: SO_RUNDIR=$(APACHE2_RUNDIR)
 $(o)/apache/mod_authn_subauth.oo: CFLAGS+=$(APACHE2_CFLAGS) -Wno-redundant-decls
 
 .PHONY: install-apache
+install:: install-apache
 install-apache:
        install -d -m 755 $(DESTDIR)$(INSTALL_APACHE2_MOD_DIR) $(DESTDIR)$(INSTALL_APACHE2_CONFIG_DIR)/mods-available
-       install -m 755 run/$(APACHE2_RUNDIR)/mod_authn_subauth.so $(DESTDIR)$(INSTALL_APACHE2_MOD_DIR)/
-#      install -m 644 $(s)/apache2/etc/mod_authn_subauth.load $(DESTDIR)$(INSTALL_APACHE2_CONFIG_DIR)/mods-available/
-
-INSTALL_TARGETS+=install-apache
+       install -m 755 $(o)/apache/mod_authn_subauth.so $(DESTDIR)$(INSTALL_APACHE2_MOD_DIR)/
+       install -m 644 $(s)/apache/mod_authn_subauth.load $(DESTDIR)$(INSTALL_APACHE2_CONFIG_DIR)/mods-available/
diff --git a/apache/mod_authn_subauth.conf b/apache/mod_authn_subauth.conf
new file mode 100644 (file)
index 0000000..287ab23
--- /dev/null
@@ -0,0 +1,10 @@
+# Example configuration for mod_authz_subauth
+
+# <Location />
+#      AuthType basic
+#      AuthName "Prove yourself!"
+#      AuthBasicProvider subauth
+#      # SubAuthSocket /var/run/subauthd.socket
+#      SubAuthZone web
+#      Require valid-user
+# </Location>
diff --git a/apache/mod_authn_subauth.load b/apache/mod_authn_subauth.load
new file mode 100644 (file)
index 0000000..4f4de53
--- /dev/null
@@ -0,0 +1 @@
+LoadModule authn_subauth /usr/lib/apache2/modules/mod_authn_subauth.so
index 608c26c96cd3a2104dbe76bac38ca8e8400df24c..4ab4e29112e65b928c8874461a3b4e8c2bfbdb07 100644 (file)
@@ -3,3 +3,9 @@ DIRS+=client
 PROGS+=$(o)/client/subauth
 
 $(o)/client/subauth: $(o)/client/subauth.o
+
+.PHONY: install-client
+install:: install-client
+install-client:
+       install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
+       install -m 755 $(o)/client/subauth $(DESTDIR)$(INSTALL_BIN_DIR)
diff --git a/debian/README b/debian/README
new file mode 100644 (file)
index 0000000..db0a861
--- /dev/null
@@ -0,0 +1,6 @@
+The Debian Package subauth
+----------------------------
+
+FIXME
+
+ -- Martin Mares <mj@ucw.cz>  Fri, 11 Aug 2017 16:55:33 +0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..69930d7
--- /dev/null
@@ -0,0 +1,5 @@
+subauth (0.9) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Martin Mares <mj@ucw.cz>  Fri, 11 Aug 2017 16:55:33 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..ab09e39
--- /dev/null
@@ -0,0 +1,30 @@
+Source: subauth
+Section: unknown
+Priority: optional
+Maintainer: Martin Mares <mj@ucw.cz>
+Build-Depends: debhelper (>= 9), dh-systemd, libucw-dev, libucw-json-dev, libgcrypt20-dev, libpam0g-dev, apache2-dev
+Standards-Version: 3.9.5
+Homepage: http://mj.ucw.cz/sw/
+Vcs-Git: git://git.ucw.cz/subauth.git
+Vcs-Browser: http://www.ucw.cz/gitweb/?p=subauth.git;a=summary
+
+Package: subauth
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Sub-authentication daemon
+ The sub-authentication daemon allows users to define secondary
+ passwords and authentication tokens for specific services.
+
+Package: libpam-subauth
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: PAM module for the sub-authentication daemon
+ This package provides the glue between the sub-authentication
+ service and Linux Pluggable Authentication Modules.
+
+Package: libapache2-mod-subauth
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Apache2 module for the sub-authentication daemon
+ This package provides the glue between the sub-authentication
+ service and Apache2 authentication.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..cf19c12
--- /dev/null
@@ -0,0 +1,24 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: subauth
+Source: <http://mj.ucw.cz/sw/>
+
+Files: *
+Copyright: 2017 Martin Mares <mj@ucw.cz>
+License: GPL-2.0+
+
+License: GPL-2.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/libapache2-mod-subauth.apache2 b/debian/libapache2-mod-subauth.apache2
new file mode 100644 (file)
index 0000000..ab7d9ce
--- /dev/null
@@ -0,0 +1,3 @@
+mod obj/apache/mod_authn_subauth.so
+mod apache/mod_authn_subauth.load
+mod apache/mod_authn_subauth.conf
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..6343182
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+#DH_VERBOSE = 1
+
+# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+# 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
+
+# main packaging script based on dh7 syntax
+%:
+       dh $@ --with=apache2,systemd
+
+override_dh_auto_configure:
+       ./configure PREFIX=/usr
+
+override_dh_auto_install:
+       make DESTDIR=debian/subauth install-server install-client
+       make DESTDIR=debian/libpam-subauth INSTALL_LIB_DIR=/lib/$(DEB_HOST_MULTIARCH) install-pam
+###    make DESTDIR=debian/libapache2-mod-subauth install-apache
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/debian/subauth.service b/debian/subauth.service
new file mode 100644 (file)
index 0000000..1fb5913
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Sub-authentication daemon
+
+[Service]
+ExecStart=/usr/sbin/subauthd
+
+[Install]
+WantedBy=multi-user.target
index 06e68ad784ec2949e14f6d48ea17ef6ccb748f4b..04edf03783643c112745e25099f04c00afccea4a 100644 (file)
@@ -4,3 +4,9 @@ PROGS+=$(o)/pam/pam_subauth.so
 
 $(o)/pam/pam_subauth.so: $(o)/pam/pam_subauth.oo
 $(o)/pam/pam_subauth.so: LIBS+=-lpam
+
+.PHONY: install-pam
+install:: install-pam
+install-pam:
+       install -d -m 755 $(DESTDIR)$(INSTALL_LIB_DIR)/security
+       install -m 644 $(o)/pam/pam_subauth.so $(DESTDIR)$(INSTALL_LIB_DIR)/security
index b4b6446337825d42b1bbe57268c8c224487c99eb..68f6d1b20f666e27628a5927c5ad59d4f4e8b6cb 100644 (file)
@@ -6,3 +6,9 @@ CONFIGS+=subauthd
 $(o)/server/subauthd: $(addprefix $(o)/server/, subauthd.o cmd.o auth.o temp.o)
 $(o)/server/subauthd: LIBS+=$(LIBGCRYPT_LIBS)
 $(o)/server/auth.o: CFLAGS+=$(LIBGCRYPT_CFLAGS)
+
+.PHONY: install-server
+install:: install-server
+install-server:
+       install -d -m 755 $(DESTDIR)$(INSTALL_SBIN_DIR)
+       install -m 755 $(o)/server/subauthd $(DESTDIR)$(INSTALL_SBIN_DIR)