summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2013-02-03 23:41:51 +0000
committerNick White <git@njw.me.uk>2013-02-03 23:41:51 +0000
commit7db1abc2f7ecd51e6eecc70543a4d267cd32f1e2 (patch)
treec807ac967d3902e1ac8890ee38c8a9cd765eff7a /debian/rules
parentee2550662ca1d9c8eba4c4bd21829682f5b10209 (diff)
parentbea67306d73bc7f18e131be2f1377076fd77e28f (diff)
Merge branch 'debmanual'
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules39
1 files changed, 39 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..292ee7f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,39 @@
+#!/usr/bin/make -f
+
+package = getxbook
+DESTDIR = debian/$(package)
+
+build:
+ $(MAKE)
+
+binary: binary-arch binary-indep
+
+binary-arch: build
+ $(MAKE) DESTDIR=$(DESTDIR) PREFIX=/usr install
+ mkdir -p $(DESTDIR)/usr/share/applications
+ cp -f debian/$(package).desktop $(DESTDIR)/usr/share/applications/
+ mkdir -p $(DESTDIR)/usr/share/menu
+ cp -f debian/menu $(DESTDIR)/usr/share/menu/$(package)
+ mkdir -p $(DESTDIR)/usr/share/doc/$(package)
+ cp -f debian/copyright $(DESTDIR)/usr/share/doc/$(package)/
+ cp -f debian/changelog $(DESTDIR)/usr/share/doc/$(package)/changelog.Debian
+ gzip -9 $(DESTDIR)/usr/share/doc/$(package)/changelog.Debian
+ for i in getabook getbnbook getgbook; \
+ do strip $(DESTDIR)/usr/bin/$$i; done
+ for i in getabook getbnbook getgbook getxbook getxbookgui; \
+ do gzip -9 $(DESTDIR)/usr/share/man/man1/$$i.1; done
+ mkdir -p $(DESTDIR)/DEBIAN
+ cp -f debian/postinst debian/postrm $(DESTDIR)/DEBIAN/
+ chmod 755 $(DESTDIR)/DEBIAN/post*
+ dpkg-shlibdeps $(DESTDIR)/usr/bin/getabook \
+ $(DESTDIR)/usr/bin/getbnbook $(DESTDIR)/usr/bin/getgbook
+ dpkg-gencontrol -P$(DESTDIR)
+ dpkg-deb -b $(DESTDIR) ../
+
+binary-indep: build
+
+clean:
+ make clean
+ rm -rf debian/$(package) debian/files debian/substvars
+
+.PHONY: build binary binary-arch binary-indep clean