Commit 0c076b02 authored by Damyan Ivanov's avatar Damyan Ivanov

move posix-lib.sh in a subdirectory

this allows installing it without execute permission,
pleasing lintian
parent 02d336f3
......@@ -6,7 +6,8 @@
all:
PREFIX = usr
SCRIPTS := $(notdir $(wildcard scripts/*))
SCRIPTS := $(filter-out lib,$(notdir $(wildcard scripts/*)))
SCRIPT_LIBS := $(notdir $(wildcard scripts/lib/*))
BINS := $(notdir $(wildcard bin/*))
BIN_MANUALS := $(addsuffix .1,$(BINS))
LINTIAN_CHECKS := $(notdir $(wildcard lintian/checks/pkg-perl/*))
......@@ -17,6 +18,7 @@ MAN_DIR := $(PREFIX)/share/man/man1
INSTALLED_SCRIPTS := $(addprefix $(DESTDIR)/$(PREFIX)/share/pkg-perl-tools/,$(SCRIPTS))
INSTALLED_SCRIPT_MANUALS := $(addprefix $(DESTDIR)/$(MAN_DIR)/dpt-,$(addsuffix .1,$(filter-out posix-lib.sh,$(SCRIPTS))))
INSTALLED_SCRIPT_LIBS := $(addprefix $(DESTDIR)/$(PREFIX)/share/pkg-perl-tools/lib/,$(SCRIPT_LIBS))
INSTALLED_BINS := $(addprefix $(DESTDIR)/$(PREFIX)/bin/,$(BINS))
INSTALLED_BIN_MANUALS := $(addprefix $(DESTDIR)/$(MAN_DIR)/,$(BIN_MANUALS))
INSTALLED_LINTIAN_CHECKS := $(addprefix $(DESTDIR)/$(PREFIX)/share/lintian/checks/pkg-perl/, $(LINTIAN_CHECKS))
......@@ -28,10 +30,12 @@ POD2MAN := pod2man --release="pkg-perl-tools $(VERSION)" -c "Debian Perl packagi
.PHONY: install
install: $(INSTALLED_SCRIPTS) $(INSTALLED_SCRIPT_MANUALS) \
$(INSTALLED_SCRIPT_LIBS) \
$(INSTALLED_BINS) $(INSTALLED_BIN_MANUALS) \
$(INSTALLED_LINTIAN_CHECKS) $(INSTALLED_LINTIAN_PROFILES)
$(DESTDIR)/$(MAN_DIR) \
$(DESTDIR)/$(PREFIX)/share/pkg-perl-tools/lib \
$(DESTDIR)/$(PREFIX)/share/lintian/checks/pkg-perl \
$(DESTDIR)/$(PREFIX)/share/lintian/profiles/pkg-perl :
$(INSTALL) -d -m 0755 $@
......@@ -42,6 +46,9 @@ $(INSTALLED_SCRIPTS): $(DESTDIR)/$(PREFIX)/share/pkg-perl-tools/% : scripts/%
$(INSTALLED_SCRIPT_MANUALS) : $(DESTDIR)/$(MAN_DIR)/dpt-%.1 : scripts/% $(DESTDIR)/$(MAN_DIR)
$(POD2MAN) -n "dpt-$*" $< > $@
$(INSTALLED_SCRIPT_LIBS): $(DESTDIR)/$(PREFIX)/share/pkg-perl-tools/lib/% : scripts/lib/% $(DESTDIR)/$(PREFIX)/share/pkg-perl-tools/lib
$(INSTALL) $< $@
$(INSTALLED_BINS) : $(DESTDIR)/$(PREFIX)/bin/% : bin/%
$(INSTALL_BIN) $< $@
sed -i 's,DPT__SCRIPTS=scripts # REPLACED.*,DPT__SCRIPTS="/$(PREFIX)/share/pkg-perl-tools",' $@
......
......@@ -18,7 +18,7 @@ EOF
[ -z "${1:-}" ] || usage
echo . "$DPT__SCRIPTS/posix-lib.sh"
echo . "$DPT__SCRIPTS/lib/posix-lib.sh"
exit 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment