chiark / gitweb /
More Debian fixes.
[mgLib] / debian / rules
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..8abd163
--- /dev/null
@@ -0,0 +1,52 @@
+#! /usr/bin/make -f
+
+build:
+       rm -rf deb-build build; mkdir deb-build
+       cd deb-build; ../configure \
+               --prefix=/usr \
+               --mandir=/usr/share/man \
+               --libexecdir=/usr/lib
+       make -C deb-build
+       touch build
+
+clean:
+       dh_clean
+       rm -rf deb-build build
+
+install: build
+       dh_clean
+       make -C deb-build install DESTDIR=`pwd`/debian/tmp
+       rm -f debian/tmp/usr/lib/*.la
+       mkdir -p debian/mglib-dev/usr/lib
+       mv debian/tmp/usr/bin debian/mglib-dev/usr/bin
+       mv debian/tmp/usr/lib/*.a debian/mglib-dev/usr/lib
+       mv debian/tmp/usr/lib/*.so debian/mglib-dev/usr/lib
+       mv debian/tmp/usr/include debian/mglib-dev/usr
+       dh_strip -a
+
+binary-indep:
+
+binary-arch: install
+       dh_testdir -a
+       dh_testroot -a
+       dh_makeshlibs -a
+       dh_compress -a
+       dh_installdocs -a
+       dh_shlibdeps -a
+       dh_gencontrol -a
+       dh_fixperms -a
+       dh_installdeb -a
+       dh_md5sums -a
+       dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+source:
+       rm -rf deb-build/*.tar.gz deb-build/=deb=
+       make -C deb-build dist PACKAGE=mglib
+       mkdir deb-build/=deb=
+       cd deb-build/=deb=; tar xvfz ../*.tar.gz
+       d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/*
+       rm -rf deb-build/=deb=
+
+.PHONY: binary binary-arch binary-indep clean install source