LIBDIR= $(DESTDIR)/usr/lib
-SBINDIR = $(DESTDIR)/usr/local/sbin
-MAN8DIR = $(DESTDIR)/usr/local/share/man/man8
+SBINDIR = $(DESTDIR)/usr/sbin
+MAN8DIR = $(DESTDIR)/usr/share/man/man8
SBINFILES = tarmap
LIBFILES = libtarmap.so libpathmap.so
asciidoc -bhtml $^
# Generic rule for making a dynamic library form a same named .c file
+V := .0
%.so: %.c
- gcc -Wall -fPIC -Wl,-init,so_init -shared -o $@ $^ -ldl
+ gcc -Wall -fPIC -Wl,-init,so_init,-soname,$@$V -shared -o $@$V $^ -ldl
# Generic rule for making a binary from a same named .c file
%: %.c
INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES))
# Generic rule to install bmo the install command without renaming
-$(LIBDIR)/% $(SBINDIR)/% $(MAN8DIR)/%: %
+$(LIBDIR)/%: %
+ install -D -T $<$V $@$V
+ ln -s $<$V $@
+
+$(SBINDIR)/% $(MAN8DIR)/%: %
install -D -T $< $@
install: $(INSTALLTARGETS)
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: preload libraries for path mapping
+ LD_PRELOAD library that overrides file access so as to offer files
+ from a given tar/tgz archive first.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pathmap
-Source: <url://example.com>
+Source: repo@borta:ralph/pathmap.git
Files: debian/*
Copyright: 2021 Ralph Ronnquist <ralph@ascii>