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;
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
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
$(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
# dh_strip
dh_compress -Xusr/share/doc/libucw/
dh_fixperms
-# dh_perl
+ dh_perl
# dh_python
dh_makeshlibs -V
dh_installdeb
$(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/
# Perl modules
DIRS+=ucw/perl
+UCW_PERL_INSTALL=
include $(s)/ucw/perl/UCW/Makefile
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
$(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
$(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
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
$(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/