File: Makefile

package info (click to toggle)
debputy 0.1.81
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,748 kB
  • sloc: python: 66,966; sh: 164; perl: 155; makefile: 43; ansic: 5
file content (40 lines) | stat: -rw-r--r-- 2,048 bytes parent folder | download
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
#!/usr/bin/make -f

DEBPUTY_INSTALLED_ROOT_DIR=/usr/share/dh-debputy
DEBPUTY_INSTALLED_PLUGIN_ROOT_DIR=/usr/share/debputy/

subs = -e 's|^$1 = .*|$1 = $2|'

# Nothing to do by default
all:

test:
	py.test -v

install:
	install -m0755 -Dt$(DESTDIR)/usr/bin dh_debputy dh_installdebputy assets/debputy
	install -m0755 -Dt$(DESTDIR)/$(DEBPUTY_INSTALLED_ROOT_DIR) deb_packer.py deb_materialization.py
	install -m0644 -Dt$(DESTDIR)/usr/share/perl5/Debian/Debhelper/Sequence lib/Debian/Debhelper/Sequence/*.pm
	install -m0644 -Dt$(DESTDIR)/usr/share/perl5/Dpkg/BuildDriver lib/Dpkg/BuildDriver/*.pm
	cp -a --reflink=auto src/debputy $(DESTDIR)/$(DEBPUTY_INSTALLED_ROOT_DIR)
	install -m0755 -d $(DESTDIR)/$(DEBPUTY_INSTALLED_PLUGIN_ROOT_DIR)
	cp -a --reflink=auto debputy $(DESTDIR)/$(DEBPUTY_INSTALLED_PLUGIN_ROOT_DIR)
	sed -i \
	   $(call subs,_VERSION,"$(shell dpkg-parsechangelog -SVersion)") \
	   $(call subs,DEBPUTY_ROOT_DIR,pathlib.Path("$(DEBPUTY_INSTALLED_ROOT_DIR)")) \
	   $(call subs,DEBPUTY_PLUGIN_ROOT_DIR,pathlib.Path("$(DEBPUTY_INSTALLED_PLUGIN_ROOT_DIR)")) \
	   $(DESTDIR)/$(DEBPUTY_INSTALLED_ROOT_DIR)/deb_materialization.py \
	   $(DESTDIR)/$(DEBPUTY_INSTALLED_ROOT_DIR)/deb_packer.py \
	   $(DESTDIR)/$(DEBPUTY_INSTALLED_ROOT_DIR)/debputy/version.py
	find $(DESTDIR)/usr/share/dh-debputy -type d -name '__pycache__' -exec rm -fr {} +
	install -m0755 -d $(DESTDIR)/usr/share/man/man1
	pod2man --utf8 --section=1 --name="debputy" -c "The debputy Debian packager helper stack" debputy.pod \
	   $(DESTDIR)/usr/share/man/man1/debputy.1
	pod2man --utf8 --section=1 --name="dh_debputy" -c "The debputy Debian packager helper stack" dh_debputy \
	   $(DESTDIR)/usr/share/man/man1/dh_debputy.1
	pod2man --utf8 --section=1 --name="dh_installdebputy" -c "The debputy Debian packager helper stack" dh_installdebputy \
	   $(DESTDIR)/usr/share/man/man1/dh_installdebputy.1
	devutils/install-translations
	chmod -R u=rwX,go=rX \
	    $(DESTDIR)/$(DEBPUTY_INSTALLED_ROOT_DIR)/debputy \
	    $(DESTDIR)/$(DEBPUTY_INSTALLED_PLUGIN_ROOT_DIR)/debputy