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