1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/usr/bin/make -f
# Invoke each target with `./debian/rules <target>'. All targets should be
# invoked with the package root as the current directory.
sourcepackage := liblopsub
package := liblopsub1
devpackage := liblopsub-dev
define checkdir
@test -f debian/rules -a -f lopsub.c || \
(echo Not in correct source directory; exit 1)
endef
SRCTOP := $(shell pwd)
TMPDIR := $(SRCTOP)/debian/tmp
DESTDIR := $(SRCTOP)/debian/$(package)
DEVDIR := $(SRCTOP)/debian/$(devpackage)
DOCS_DIR := $(DESTDIR)/usr/share/doc/$(package)
DEVDOCS_DIR := $(DEVDIR)/usr/share/doc/$(devpackage)
TRIPLET := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
build-arch:
$(checkdir)
$(MAKE)
build-indep:
build: build-indep build-arch
clean:
$(checkdir)
-rm -f debian/substvars
$(MAKE) distclean
dh_clean
INST_OWN = -o root -g root
MAKE_DIR = install -p -d $(INST_OWN) -m 755
INST_FILE = install -c $(INST_OWN) -m 644
binary: build
$(checkdir)
$(MAKE) PREFIX=/usr install DESTDIR=$(TMPDIR)
mv $(TMPDIR)/usr/lib $(TMPDIR)/usr/lib-$(TRIPLET)
$(MAKE_DIR) $(TMPDIR)/usr/lib
mv $(TMPDIR)/usr/lib-$(TRIPLET) $(TMPDIR)/usr/lib/$(TRIPLET)
dh_install -p $(package)
dh_install -p $(devpackage)
$(MAKE_DIR) $(DESTDIR)/DEBIAN $(DOCS_DIR) $(DEVDOCS_DIR)
echo 'activate-noawait ldconfig' > $(DESTDIR)/DEBIAN/triggers
$(INST_FILE) debian/copyright $(DOCS_DIR)/copyright
$(INST_FILE) debian/copyright $(DEVDOCS_DIR)/copyright
$(INST_FILE) debian/changelog $(DOCS_DIR)/changelog.Debian
$(INST_FILE) debian/changelog $(DEVDOCS_DIR)/changelog.Debian
gzip -f9 $(DOCS_DIR)/changelog.Debian
gzip -f9 $(DEVDOCS_DIR)/changelog.Debian
dh_makeshlibs
dh_shlibdeps
dh_strip
dh_shlibdeps
dh_gencontrol
dh_builddeb
binary-indep binary-arch: binary
.PHONY: clean build binary-arch binary-indep binary
|