Integrate with Debian packaging
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 13 Mar 2024 12:18:30 +0000 (13:18 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 13 Mar 2024 12:18:30 +0000 (13:18 +0100)
12 files changed:
Makefile [new file with mode: 0644]
argeo-freed.spec
debian/.gitignore
debian/argeo-freed-cms-user.install [deleted file]
debian/argeo-freed-cms.install
debian/argeo-freed-libreswan.install
debian/argeo-freed-roaming-client.install
debian/argeo-freed-roaming-host.install [deleted file]
debian/changelog
debian/control
debian/rules
local.mk [deleted file]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..474c896
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,57 @@
+# GNU coding standards
+prefix ?= /usr/local
+exec_prefix ?= $(prefix)
+bindir ?= $(exec_prefix)/bin
+sbindir ?= $(exec_prefix)/sbin
+libdir ?= $(exec_prefix)/lib
+libexecdir ?= $(exec_prefix)/libexec
+sysconfdir ?= $(prefix)/etc
+srcdir ?= $(prefix)/src
+datarootdir ?= $(prefix)/share
+
+## Utilities
+# Install to a target directory without executable bit
+INSTALL=install -m644 -D --target-directory
+# Always try copy-on-write
+COPY=cp --reflink=auto
+
+# TODO use argeo-build
+BUILD_BASE ?= output/argeo-freed
+all:
+       mkdir -p $(BUILD_BASE)$(sysconfdir) $(BUILD_BASE)$(bindir) $(BUILD_BASE)$(libdir) $(BUILD_BASE)$(libexecdir)
+       $(COPY) -r etc/* $(BUILD_BASE)$(sysconfdir)
+       $(COPY) -r bin/* $(BUILD_BASE)$(bindir)
+       $(COPY) -r lib/* $(BUILD_BASE)$(libdir)
+       $(COPY) -r libexec/* $(BUILD_BASE)$(libexecdir)
+       sed -i 's|/usr/local/etc|$(sysconfdir)|' $(BUILD_BASE)$(libdir)/systemd/*/argeo*.service
+       sed -i 's|/usr/local/lib|$(libdir)|' $(BUILD_BASE)$(libdir)/systemd/*/argeo*.service
+       sed -i 's|/usr/local/share|$(datarootdir)|' $(BUILD_BASE)$(libdir)/systemd/*/argeo*.service
+       sed -i 's|/usr/local/share|$(datarootdir)|' $(BUILD_BASE)$(bindir)/*
+       sed -i 's|/usr/local/lib|$(libdir)|' $(BUILD_BASE)$(libdir)/sysj/jvm.args
+#      $(MAKE) -C sjbin all
+
+clean:
+       $(RM) -r $(BUILD_BASE)
+#      $(MAKE) -C sjbin clean
+
+distclean: clean
+
+install:
+       mkdir -p $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(libexecdir)
+# TODO use install and wildcard ?
+       $(COPY) -v -r --no-clobber $(BUILD_BASE)$(sysconfdir)/* $(DESTDIR)$(sysconfdir)
+       $(COPY) -v -r $(BUILD_BASE)$(libdir)/* $(DESTDIR)$(libdir)
+       install -m755 -D --target-directory $(DESTDIR)$(bindir) $(BUILD_BASE)$(bindir)/* 
+       install -m755 -D --target-directory $(DESTDIR)$(libexecdir)/ipsec $(BUILD_BASE)$(libexecdir)/ipsec/*
+#      systemctl daemon-reload
+
+uninstall:
+# TODO fix warning when directory does not exist
+       $(foreach f, $(shell cd $(BUILD_BASE)$(bindir) && find . -type f), $(RM) $(DESTDIR)$(bindir)/$(f);)
+       $(foreach f, $(shell cd $(BUILD_BASE)$(libdir) && find . -type f), $(RM) $(DESTDIR)$(libdir)/$(f);)
+       $(foreach f, $(shell cd $(BUILD_BASE)$(libexecdir) && find . -type f), $(RM) $(DESTDIR)$(libexecdir)/$(f);)
+# TODO remove empty directories
+#      @if [ -d $(A2_INSTALL_TARGET) ]; then find $(A2_INSTALL_TARGET) -empty -type d -delete; fi
+
+purge: uninstall       
+       $(foreach f, $(shell cd $(BUILD_BASE)$(sysconfdir) && find . -type f), $(RM) $(DESTDIR)$(sysconfdir)/$(f);)
index 1357e2f65925867b4ebb4ea9a5093714f29344a6..2912049812f4b96634d3e06b7666a928a75356cb 100644 (file)
@@ -1,5 +1,5 @@
 Name:           argeo-freed
-Version:        2.3.5
+Version:        2.3.6
 Release:        1%{?dist}
 Summary:        Utilities for a FREEd compatible domain
 
@@ -19,10 +19,6 @@ BuildRequires: systemd-rpm-macros
 Summary:        FREEd Argeo CMS services
 Requires:       argeo-cms
 
-%package cms-user
-Summary:        FREEd Argeo CMS user services
-Requires:       argeo-cms
-
 %description cms
 
 %package libreswan
@@ -37,75 +33,41 @@ Requires:       argeo-freed-libreswan
 
 %description roaming-client
 
-%package roaming-host
-Summary:        FREEd roaming host
-Requires:       argeo-freed-libreswan
-
-%description roaming-host
-
 %prep
 %setup -q
 
 %build
 
 %install
-mkdir -p %{buildroot}%{_bindir}
-cp -a ./usr/bin/* %{buildroot}%{_bindir}
-
-mkdir -p %{buildroot}%{_sysconfdir}
-cp -a ./etc/* %{buildroot}%{_sysconfdir}
-
-mkdir -p %{buildroot}%{_datadir}
-cp -a ./usr/share/* %{buildroot}%{_datadir}
-
-mkdir -p %{buildroot}%{_unitdir}
-cp -a ./usr/lib/systemd/system/* %{buildroot}%{_unitdir}
-
-mkdir -p %{buildroot}%{_userunitdir}
-cp -a ./usr/lib/systemd/user/* %{buildroot}%{_userunitdir}
-
-mkdir -p %{buildroot}%{_libexecdir}
-cp -a ./usr/libexec/ipsec %{buildroot}%{_libexecdir}
 
 %files cms
 %attr(755, root, root) %{_bindir}/argeo
 %attr(755, root, root) %{_bindir}/jshc
 
 %{_sysconfdir}/argeo.d
-%{_datadir}/argeo
-%{_unitdir}/argeo@.service
-
-%files cms-user
-%{_sysconfdir}/argeo.user.d
-%{_userunitdir}/argeo@.service
+%{_sysconfdir}/argeo
+%{_unitdir}/argeo*.service
+%{_userunitdir}/argeo*.service
 
 %files libreswan
 %attr(755, root, root) %{_libexecdir}/ipsec
 
 %files roaming-client
-%{_sysconfdir}/ipsec.d/roaming.conf
-
 %{_unitdir}/freed-ipsec-roaming@.service
 %{_unitdir}/freed-onresume.service
 %{_unitdir}/freed-onsuspend.service
 
 %post cms
 %systemd_post argeo@.service
+%systemd_user_post argeo.service
 
 %preun cms
 %systemd_preun argeo@.service
+%systemd_user_preun argeo.service
 
 %postun cms
 %systemd_postun argeo@.service
-
-%post cms-user
-%systemd_user_post argeo@.service
-
-%preun cms-user
-%systemd_user_preun argeo@.service
-
-%postun cms-user
-%systemd_user_postun argeo@.service
+%systemd_user_postun argeo.service
 
 %post roaming-client
 %systemd_post freed-ipsec-roaming@.service
@@ -121,7 +83,3 @@ cp -a ./usr/libexec/ipsec %{buildroot}%{_libexecdir}
 %systemd_postun freed-ipsec-roaming@.service
 %systemd_postun freed-onresume.service
 %systemd_postun freed-onsuspend.service
-
-%files roaming-host
-%{_sysconfdir}/ipsec.d/roaming-host.conf
-%{_sysconfdir}/ipsec.d/roaming-host-domain.conf.template
index 3eb1ca13e981ab79757f62d6dea28a51f73141a1..3319cdaea664e52e38a58ed1abd20d40b5807577 100644 (file)
@@ -1,5 +1,6 @@
 files
-.debhelper
+*.debhelper
 debhelper*
 argeo-*/
-*.substvars
\ No newline at end of file
+*.substvars
+/tmp/
diff --git a/debian/argeo-freed-cms-user.install b/debian/argeo-freed-cms-user.install
deleted file mode 100644 (file)
index 037dcd0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-./etc/argeo.user.d/* ./etc/argeo.user.d
-./usr/lib/systemd/user/argeo@.service ./usr/lib/systemd/user
index b2195f089150fc02fbe3c4053792e786fb3c2414..1fce35ad7e70b2219d673e254a4869a7fe9995de 100644 (file)
@@ -1,8 +1,8 @@
-./usr/bin/argeo ./usr/bin
-./usr/bin/jshc ./usr/bin
+/usr/bin/argeo
+/usr/bin/jshc
 
-./etc/argeo.d/* ./etc/argeo.d
+/etc/argeo/*
+/etc/argeo.d/*
 
-./usr/lib/systemd/system/argeo@.service ./usr/lib/systemd/system
-
-./usr/share/argeo/* ./usr/share/argeo
+/usr/lib/systemd/system/argeo*.service
+/usr/lib/systemd/user/argeo*.service
index 57586ba4af530dd1b1851819738c01ba488d468a..811f5db53a04f083ee511e4c0a2974d4e1a90888 100644 (file)
@@ -1 +1 @@
-./usr/libexec/ipsec/* ./usr/libexec/ipsec
+/usr/libexec/ipsec
index 6f0a7ae60feac00d40a7709dd027d448f8869a76..b612fb34f11b765a6e6381e93615656b5729d121 100644 (file)
@@ -1,4 +1,3 @@
-./etc/ipsec.d/roaming.conf ./etc/ipsec.d
-./usr/lib/systemd/system/freed-ipsec-roaming@.service ./usr/lib/systemd/system
-./usr/lib/systemd/system/freed-onresume.service ./usr/lib/systemd/system
-./usr/lib/systemd/system/freed-onsuspend.service ./usr/lib/systemd/system
+/usr/lib/systemd/system/freed-ipsec-roaming@.service
+/usr/lib/systemd/system/freed-onresume.service
+/usr/lib/systemd/system/freed-onsuspend.service
diff --git a/debian/argeo-freed-roaming-host.install b/debian/argeo-freed-roaming-host.install
deleted file mode 100644 (file)
index acfec8d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-./etc/ipsec.d/roaming-host.conf ./etc/ipsec.d
-./etc/ipsec.d/roaming-host-domain.conf.template ./etc/ipsec.d
index 73ce3cd770a52b9288ed785d6f1ff828f3047216..d0d2678ed5c62f981d75940177ce3c8d2086e013 100644 (file)
@@ -1,5 +1,5 @@
-argeo-freed (2.3.5) unstable; urgency=medium
+argeo-freed (2.3.6) unstable; urgency=medium
 
-  * Adapt to changes in Argeo TP
+  * New directory structure
 
- -- Mathieu Baudier <mbaudier@argeo.org>  Thu, 14 Dec 2023 05:48:41 +0000
+ -- Mathieu Baudier <mbaudier@argeo.org>  Wed, 13 Mar 2024 11:12:52 +0000
index 6c4b9d30eafac5b22ff66aa92523536a13e893aa..7a07f795d184fb0448d8c45bcb765309fb0ff556 100644 (file)
@@ -13,27 +13,14 @@ Conflicts: argeo-init
 Description: FREEd Argeo CMS services
  FREEd Argeo CMS services
 
-Package: argeo-freed-cms-user
-Architecture: all
-Depends: ${misc:Depends}, argeo-cms
-Conflicts: argeo-init
-Description: FREEd Argeo CMS user services
- FREEd Argeo CMS user services
-
 Package: argeo-freed-libreswan
 Architecture: all
 Depends: ${misc:Depends}, libreswan
 Description: FREEd extensions to libreswan
Argeo FREEd extensions to libreswan
+ FREEd extensions to libreswan
 
 Package: argeo-freed-roaming-client
 Architecture: all
 Depends: ${misc:Depends}, argeo-freed-libreswan
 Description: FREEd roaming client
- Argeo FREEd roaming client
-
-Package: argeo-freed-roaming-host
-Architecture: all
-Depends: ${misc:Depends}, argeo-freed-libreswan
-Description: FREEd roaming host
- Argeo FREEd roaming host
+ FREEd roaming client
index 2d33f6ac8992b7da84b39a5bca0742c4962d3349..cd69d93dbbdf3bb0a34eb1b3ca768fb7d7c9c3ee 100755 (executable)
@@ -1,4 +1,7 @@
 #!/usr/bin/make -f
 
 %:
-       dh $@
+       prefix=/usr sysconfdir=/etc dh $@
+       
+override_dh_missing:
+       # Ignore missing files
diff --git a/local.mk b/local.mk
deleted file mode 100644 (file)
index dabffac..0000000
--- a/local.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-# GNU coding standards
-prefix ?= /usr/local
-exec_prefix ?= $(prefix)
-bindir ?= $(exec_prefix)/bin
-sbindir ?= $(exec_prefix)/sbin
-libdir ?= $(exec_prefix)/lib
-libexecdir ?= $(exec_prefix)/libexec
-sysconfdir ?= $(prefix)/etc
-srcdir ?= $(prefix)/src
-datarootdir ?= $(prefix)/share
-
-## Utilities
-# Install to a target directory without executable bit
-INSTALL=install -m644 -D --target-directory
-# Always try copy-on-write
-COPY=cp --reflink=auto
-
-# TODO use argeo-build
-BUILD_BASE = output/argeo-freed
-all:
-       mkdir -p $(BUILD_BASE)$(sysconfdir) $(BUILD_BASE)$(bindir) $(BUILD_BASE)$(libdir) $(BUILD_BASE)$(libexecdir)
-       $(COPY) -r etc/* $(BUILD_BASE)$(sysconfdir)
-       $(COPY) -r bin/* $(BUILD_BASE)$(bindir)
-       $(COPY) -r lib/* $(BUILD_BASE)$(libdir)
-       $(COPY) -r libexec/* $(BUILD_BASE)$(libexecdir)
-       sed -i 's|/usr/local/etc|$(sysconfdir)|' $(BUILD_BASE)$(libdir)/systemd/*/argeo*.service
-       sed -i 's|/usr/local/lib|$(libdir)|' $(BUILD_BASE)$(libdir)/systemd/*/argeo*.service
-       sed -i 's|/usr/local/share|$(datarootdir)|' $(BUILD_BASE)$(libdir)/systemd/*/argeo*.service
-       sed -i 's|/usr/local/share|$(datarootdir)|' $(BUILD_BASE)$(bindir)/*
-       sed -i 's|/usr/local/lib|$(libdir)|' $(BUILD_BASE)$(libdir)/sysj/jvm.args
-#      $(MAKE) -C sjbin all
-
-clean:
-       $(RM) -r $(BUILD_BASE)
-#      $(MAKE) -C sjbin clean
-
-install:
-# TODO use install and wildcard ?
-       $(COPY) -v -r --no-clobber $(BUILD_BASE)$(sysconfdir)/* $(DESTDIR)$(sysconfdir)
-       $(COPY) -v -r $(BUILD_BASE)$(libdir)/* $(DESTDIR)$(libdir)
-       install -m755 -D --target-directory $(DESTDIR)$(bindir) $(BUILD_BASE)$(bindir)/* 
-       install -m755 -D --target-directory $(DESTDIR)$(libexecdir)/ipsec $(BUILD_BASE)$(libexecdir)/ipsec/*
-#      systemctl daemon-reload
-
-uninstall:
-# TODO fix warning when directory does not exist
-       $(foreach f, $(shell cd $(BUILD_BASE)$(bindir) && find . -type f), $(RM) $(DESTDIR)$(bindir)/$(f);)
-       $(foreach f, $(shell cd $(BUILD_BASE)$(libdir) && find . -type f), $(RM) $(DESTDIR)$(libdir)/$(f);)
-       $(foreach f, $(shell cd $(BUILD_BASE)$(libexecdir) && find . -type f), $(RM) $(DESTDIR)$(libexecdir)/$(f);)
-# TODO remove empty directories
-#      @if [ -d $(A2_INSTALL_TARGET) ]; then find $(A2_INSTALL_TARGET) -empty -type d -delete; fi
-
-purge: uninstall       
-       $(foreach f, $(shell cd $(BUILD_BASE)$(sysconfdir) && find . -type f), $(RM) $(DESTDIR)$(sysconfdir)/$(f);)