chiark / gitweb /
debian/: groupmanage: Prep for move (nfc)
[userv-utils.git] / debian / rules
index a06ad571c542780d24565568d803948a0c60a4e6..b8b47aa6e777af52ffb37a967d8305d29f899176 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with userv-utils; if not, see http://www.gnu.org/licenses/.
 
-subdirs_build= ipif www-cgi git-daemon
+subdirs_build= ipif ucgi git-daemon
 subdirs_nobuild=dyndns groupmanage misc
 package=       userv-utils
-packages_indep=        userv-dyndns userv-groupmanage userv-misc userv-git-daemon
+packages_indep=        userv-dyndns userv-groupmanage userv-utils userv-git-daemon
 packages_arch= userv-ipif userv-cgi
 packages=      $(packages_indep) $(packages_arch)
 
+SHELL=/bin/bash
+
 cwd=   $(shell pwd)
 d=     $(cwd)/debian
 
@@ -57,17 +59,35 @@ override_dh_auto_install:
                ; \
        done
        -
-       mv debian/userv-www-cgi debian/userv-cgi
-       mv debian/userv-groupmanage/usr/share/doc/groupmanage \
-          debian/userv-groupmanage/usr/share/doc/userv-groupmanage
+       mv debian/userv-misc debian/userv-utils
+       -
+       mv $d/userv-ipif/usr/share/doc/userv-ipif/{service.c.txt,ipif.txt}
+       -
+       set -e; cd debian/userv-ucgi/usr/share/doc/userv-ucgi;  \
+               rename 's/^/ucgi-/' *
+       -
+       set -e; cd debian/userv-groupmanage/usr/share/doc;      \
+               mv groupmanage userv-groupmanage
+       -
+       set -e; for p in userv-ipif userv-ucgi; do              \
+               (cd debian/$$p/usr/share/doc;                   \
+                mv $$p userv-utils);                           \
+               cp -al debian/$$p/. debian/userv-utils/.;       \
+       done
+       -
+       perl -pe 's{/usr/local/}{/usr/}' ucgi/www-cgi   \
+               >debian/userv-utils/etc/userv/services.d/www-cgi
        -
        rename 's/\.example$$//' $d/userv-ipif/etc/userv/vpn/*.example \
                $d/userv-dyndns/etc/userv/dyndns-service-users.example \
                $d/userv-groupmanage/etc/groupmanage.conf.example
        rename 's/\.distrib$$//' $d/*/etc/userv/services.d/*.distrib
-       rename 's/$$/\.disabled/' $d/userv-misc/etc/userv/services.d/mailq
        -
-       mv $d/userv-misc/usr/bin/mailq $d/userv-misc/usr/bin/mailq.userv
+       mv $d/userv-utils/usr/bin/mailq $d/userv-utils/usr/bin/mailq.userv
+       -
+       set -e; cd $d/userv-utils/etc/userv;                    \
+               mkdir services-available;                       \
+               mv services.d/* services-available/
 
 override_dh_install: