r2294: Autocommit for make-debian
[uffi.git] / debian / rules
1 #!/usr/bin/make -f
2
3 export DH_COMPAT=4
4
5 pkg     := uffi
6 debpkg  := cl-uffi
7
8
9 clc-source      := usr/share/common-lisp/source
10 clc-systems     := usr/share/common-lisp/systems
11 clc-uffi        := $(clc-source)/$(pkg)
12
13 doc-dir         := usr/share/doc/$(debpkg)
14
15
16 configure: configure-stamp
17 configure-stamp:
18         dh_testdir
19         # Add here commands to configure the package.
20
21         touch configure-stamp
22
23
24 build: build-stamp
25
26 build-stamp: configure-stamp 
27         dh_testdir
28
29         # Add here commands to compile the package.
30
31         touch build-stamp
32
33 clean:
34         dh_testdir
35         dh_testroot
36         rm -f build-stamp configure-stamp
37
38         # Add here commands to clean up after the build process.
39         -$(MAKE) clean
40         rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
41
42         dh_clean
43
44 install: build
45         dh_testdir
46         dh_testroot
47         dh_clean -k
48         dh_installdirs --all $(clc-systems) $(clc-source) 
49         dh_installdirs -p $(debpkg) $(doc-dir) $(clc-uffi)/mcl 
50
51         # Add here commands to install the package into debian/uffi.
52         dh_install uffi.system uffi.asd $(clc-systems)
53         dh_install "uffi/*.cl" $(clc-uffi)
54         dh_install "uffi/mcl/*.cl" $(clc-uffi)/mcl
55
56         rm -rf doc/html
57         (cd doc; tar xzf html.tar.gz; cd ..)
58         dh_install doc/html $(doc-dir)
59         rm -rf doc/html
60         cp doc/uffi.pdf doc/cl-uffi.pdf
61         gzip -9 doc/cl-uffi.pdf
62         dh_install doc/cl-uffi.pdf.gz $(doc-dir)
63
64 # Build architecture-independent files here.
65 binary-indep: build install
66
67
68 # Build architecture-dependent files here.
69 binary-arch: build install
70         dh_testdir
71         dh_testroot
72 #       dh_installdebconf       
73         dh_installdocs
74         dh_installexamples examples/*.cl
75 #       dh_installmenu
76 #       dh_installlogrotate
77 #       dh_installemacsen
78 #       dh_installpam
79 #       dh_installmime
80 #       dh_installinit
81 #       dh_installcron
82 #       dh_installman
83 #       dh_installinfo
84 #       dh_undocumented
85         dh_installchangelogs ChangeLog
86         dh_strip
87         dh_compress
88         dh_fixperms
89 #       dh_makeshlibs
90         dh_installdeb
91 #       dh_perl
92         dh_shlibdeps
93         dh_gencontrol
94         dh_md5sums
95         dh_builddeb
96
97 binary: binary-indep binary-arch
98 .PHONY: build clean binary-indep binary-arch binary install configure
99