From b75df59cbdc726ba6a204c82f6a55e4cc1eb0630 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 22 Jul 2017 12:29:34 +0200 Subject: [PATCH] Debian: A separate package for (most) Perl modules --- debian/config | 6 ++++++ debian/control.in | 8 +++++++- debian/rules | 3 ++- ucw/perl/Filelock/Makefile | 2 +- ucw/perl/Makefile | 6 ++++++ ucw/perl/UCW/CGI/Makefile | 2 +- ucw/perl/UCW/Configure/Makefile | 2 +- ucw/perl/UCW/Makefile | 6 +++--- ucw/perl/Ulimit/Makefile | 2 +- 9 files changed, 28 insertions(+), 9 deletions(-) diff --git a/debian/config b/debian/config index dc568dc1..f4e16a82 100644 --- a/debian/config +++ b/debian/config @@ -15,4 +15,10 @@ UnSet("CONFIG_IMAGES_LIBUNGIF"); Set("CONFIG_IMAGES_LIBGIF"); UnSet("CONFIG_UCW_OBSOLETE_DAEMON_HELPER"); +# The basic Perl modules (UCW::Configure etc.) are installed, +# but extensions involving XS code (UCW::FileLock, UCW::Ulimit) +# aren't, because they are seldom used and their installation +# rules are incompatible with Debian directory structure. +UnSet("CONFIG_UCW_PERL_MODULES"); + 1; diff --git a/debian/control.in b/debian/control.in index 8a729eb5..28c16fce 100644 --- a/debian/control.in +++ b/debian/control.in @@ -19,7 +19,7 @@ Description: LibUCW library Package: libucw-dev Section: libdevel Architecture: any -Depends: libucw@UCW_ABI_SUFFIX@ (= @VER@), ${shlibs:Depends}, ${misc:Depends} +Depends: libucw@UCW_ABI_SUFFIX@ (= @VER@), libucw-perl, ${shlibs:Depends}, ${misc:Depends} Description: LibUCW development files Package: libucw-utils @@ -28,6 +28,12 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: LibUCW utilities +Package: libucw-perl +Section: misc +Architecture: any +Depends: libucw@UCW_ABI_SUFFIX@, ${shlib:Depends}, ${misc:Depends} +Description: Companion Perl scripts for LibUCW (UCW::Configure, UCW::CGI, UCW::Config, UCW::Log) + #ifdef CONFIG_DOC Package: libucw-doc Section: doc diff --git a/debian/rules b/debian/rules index 921ed010..84a4e8a1 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,7 @@ install: build $(MAKE) DESTDIR=$(CURDIR)/debian/libucw$(UCW_ABI_SUFFIX) install-libucw-lib $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-dev install-libucw-api $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-utils install-ucw-shell install-ucw-utils + $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-perl install-perl-ucw ifdef CONFIG_DOC $(MAKE) DESTDIR=$(CURDIR)/debian/libucw-doc install-libucw-docs install-libucw-man install-libucw-config install -d -m 755 $(CURDIR)/debian/libucw-doc/usr/share/doc/libucw/examples @@ -76,7 +77,7 @@ binary-arch: build install # dh_strip dh_compress -Xusr/share/doc/libucw/ dh_fixperms -# dh_perl + dh_perl # dh_python dh_makeshlibs -V dh_installdeb diff --git a/ucw/perl/Filelock/Makefile b/ucw/perl/Filelock/Makefile index fc557335..ca761376 100644 --- a/ucw/perl/Filelock/Makefile +++ b/ucw/perl/Filelock/Makefile @@ -23,7 +23,7 @@ $(o)/$(FILELOCK_DIR)/Filelock.xs: $(s)/$(FILELOCK_DIR)/Filelock.xs $(o)/$(FILELOCK_DIR)/Makefile.PL: $(s)/$(FILELOCK_DIR)/Makefile.PL $(Q)cp $^ $@ -INSTALL_TARGETS+=install-perl-ucw-filelock +UCW_PERL_INSTALL+=install-perl-ucw-filelock install-perl-ucw-filelock: install -d -m 755 $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/ $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 $(s)/$(FILELOCK_DIR)/Filelock.pm $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/ diff --git a/ucw/perl/Makefile b/ucw/perl/Makefile index 787d5e75..19b2ba53 100644 --- a/ucw/perl/Makefile +++ b/ucw/perl/Makefile @@ -1,6 +1,7 @@ # Perl modules DIRS+=ucw/perl +UCW_PERL_INSTALL= include $(s)/ucw/perl/UCW/Makefile @@ -8,3 +9,8 @@ ifdef CONFIG_UCW_PERL_MODULES include $(s)/ucw/perl/Ulimit/Makefile include $(s)/ucw/perl/Filelock/Makefile endif + +INSTALL_TARGETS+=install-perl-ucw + +install-perl-ucw: $(UCW_PERL_INSTALL) +.PHONY: install-perl-ucw diff --git a/ucw/perl/UCW/CGI/Makefile b/ucw/perl/UCW/CGI/Makefile index f57b838c..584e8938 100644 --- a/ucw/perl/UCW/CGI/Makefile +++ b/ucw/perl/UCW/CGI/Makefile @@ -8,7 +8,7 @@ PROGS+=$(CGI_MODULES) $(CGI_MODULES) : PERL_MODULE_DIR=UCW/CGI -INSTALL_TARGETS+=install-perl-ucw-cgi +UCW_PERL_INSTALL+=install-perl-ucw-cgi install-perl-ucw-cgi: install -d -m 755 $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/CGI install -m 644 $(addprefix $(s)/ucw/perl/UCW/CGI/,$(UCW_CGI_PERL_MODULES)) $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/CGI diff --git a/ucw/perl/UCW/Configure/Makefile b/ucw/perl/UCW/Configure/Makefile index 49679d3d..697e3e5d 100644 --- a/ucw/perl/UCW/Configure/Makefile +++ b/ucw/perl/UCW/Configure/Makefile @@ -8,7 +8,7 @@ PROGS+=$(CONFIGURE_MODULES) $(CONFIGURE_MODULES) : PERL_MODULE_DIR=UCW/Configure -INSTALL_TARGETS+=install-perl-ucw-configure +UCW_PERL_INSTALL+=install-perl-ucw-configure install-perl-ucw-configure: install -d -m 755 $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/Configure install -m 644 $(addprefix $(s)/ucw/perl/UCW/Configure/,$(UCW_CONFIGURE_PERL_MODULES)) $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/Configure diff --git a/ucw/perl/UCW/Makefile b/ucw/perl/UCW/Makefile index ddbcfecf..149dfd41 100644 --- a/ucw/perl/UCW/Makefile +++ b/ucw/perl/UCW/Makefile @@ -8,8 +8,8 @@ PROGS+=$(addprefix $(o)/ucw/perl/UCW/,$(UCW_PERL_MODULES)) include $(s)/ucw/perl/UCW/CGI/Makefile include $(s)/ucw/perl/UCW/Configure/Makefile -INSTALL_TARGETS+=install-perl-ucw -install-perl-ucw: +UCW_PERL_INSTALL+=install-perl-ucw-base +install-perl-ucw-base: install -d -m 755 $(DESTDIR)$(INSTALL_PERL_DIR)/UCW install -m 644 $(addprefix $(s)/ucw/perl/UCW/,$(UCW_PERL_MODULES)) $(DESTDIR)$(INSTALL_PERL_DIR)/UCW -.PHONY: install-perl-ucw +.PHONY: install-perl-ucw-base diff --git a/ucw/perl/Ulimit/Makefile b/ucw/perl/Ulimit/Makefile index 4dd67d62..f492fbf4 100644 --- a/ucw/perl/Ulimit/Makefile +++ b/ucw/perl/Ulimit/Makefile @@ -23,7 +23,7 @@ $(o)/$(ULIMIT_DIR)/Ulimit.xs: $(s)/$(ULIMIT_DIR)/Ulimit.xs $(o)/$(ULIMIT_DIR)/Makefile.PL: $(s)/$(ULIMIT_DIR)/Makefile.PL $(Q)cp $^ $@ -INSTALL_TARGETS+=install-perl-ucw-ulimit +UCW_PERL_INSTALL+=install-perl-ucw-ulimit install-perl-ucw-ulimit: install -d -m 755 $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/ $(DESTDIR)$(INSTALL_LIB_DIR) install -m 644 $(s)/$(ULIMIT_DIR)/Ulimit.pm $(DESTDIR)$(INSTALL_PERL_DIR)/UCW/ -- 2.39.5