r2225: Autocommit for make-debian
[uffi.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 # export DH_VERBOSE=1
7
8 # This is the debhelper compatibility version to use.
9 export DH_COMPAT=4
10
11 pkg     := uffi
12 debpkg  := cl-uffi
13
14 INSTALL := install
15 INSTALLFLAGS    := -g root -o root -m 0644
16
17 UPSTREAM_VER    := $(shell sed -n -e "s/${debpkg} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog |head -1)
18
19 pkg-ver         := $(debpkg)-$(UPSTREAM_VER)
20 clc-source      := usr/share/common-lisp/source
21 clc-systems     := usr/share/common-lisp/systems
22 clc-uffi        := $(clc-source)/$(pkg)-$(UPSTREAM_VER)
23
24 doc-dir         := usr/share/doc/${debpkg}
25 lispfiles       := $(clc-uffi)
26
27
28 configure: configure-stamp
29 configure-stamp:
30         dh_testdir
31         # Add here commands to configure the package.
32
33         touch configure-stamp
34
35
36 build: build-stamp
37
38 build-stamp: configure-stamp 
39         dh_testdir
40
41         # Add here commands to compile the package.
42
43         touch build-stamp
44
45 clean:
46         dh_testdir
47         dh_testroot
48         rm -f build-stamp configure-stamp
49
50         # Add here commands to clean up after the build process.
51         -$(MAKE) clean
52         rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
53
54         dh_clean
55
56 install: build
57         dh_testdir
58         dh_testroot
59         dh_clean -k
60         dh_installdirs --all $(clc-systems) $(clc-source) 
61         dh_installdirs -p $(debpkg) $(doc-dir) $(lispfiles)/mcl 
62
63         # Add here commands to install the package into debian/uffi.
64         dh_install "src/*.cl" "*.system" $(lispfiles)
65         dh_install "src/mcl/*.cl" $(lispfiles)/mcl
66
67         rm -rf doc/html
68         (cd doc; tar xzf html.tar.gz; cd ..)
69         dh_install doc/html $(doc-dir)
70         rm -rf doc/html
71         cp doc/uffi.pdf doc/cl-uffi.pdf
72         gzip -9 doc/cl-uffi.pdf
73         dh_install doc/cl-uffi.pdf.gz $(doc-dir)
74
75 # Build architecture-independent files here.
76 binary-indep: build install
77
78
79 # Build architecture-dependent files here.
80 binary-arch: build install
81         dh_testdir
82         dh_testroot
83 #       dh_installdebconf       
84         dh_installdocs
85         dh_installexamples examples/*.cl
86 #       dh_installmenu
87 #       dh_installlogrotate
88 #       dh_installemacsen
89 #       dh_installpam
90 #       dh_installmime
91 #       dh_installinit
92 #       dh_installcron
93 #       dh_installman
94 #       dh_installinfo
95 #       dh_undocumented
96         dh_installchangelogs ChangeLog
97         dh_strip
98         dh_compress
99         dh_fixperms
100         dh_link -p $(debpkg) $(clc-uffi) $(clc-source)/$(pkg)
101 #       dh_makeshlibs
102         dh_installdeb
103 #       dh_perl
104         dh_shlibdeps
105         dh_gencontrol
106         dh_md5sums
107         dh_builddeb
108
109 binary: binary-indep binary-arch
110 .PHONY: build clean binary-indep binary-arch binary install configure
111