r2212: *** empty log message ***
[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         rm -f doc/cl-uffi.pdf.gz
73         gzip doc/cl-uffi.pdf
74         dh_install doc/cl-uffi.pdf.gz $(doc-dir)
75         rm -f doc/cl-uffi.pdf.gz
76
77 # Build architecture-independent files here.
78 binary-indep: build install
79
80
81 # Build architecture-dependent files here.
82 binary-arch: build install
83         dh_testdir
84         dh_testroot
85 #       dh_installdebconf       
86         dh_installdocs
87         dh_installexamples examples/*.cl
88 #       dh_installmenu
89 #       dh_installlogrotate
90 #       dh_installemacsen
91 #       dh_installpam
92 #       dh_installmime
93 #       dh_installinit
94 #       dh_installcron
95 #       dh_installman
96 #       dh_installinfo
97 #       dh_undocumented
98         dh_installchangelogs ChangeLog
99         dh_strip
100         dh_compress
101         dh_fixperms
102         dh_link -p $(debpkg) $(clc-uffi) $(clc-source)/$(pkg)
103 #       dh_makeshlibs
104         dh_installdeb
105 #       dh_perl
106         dh_shlibdeps
107         dh_gencontrol
108         dh_md5sums
109         dh_builddeb
110
111 binary: binary-indep binary-arch
112 .PHONY: build clean binary-indep binary-arch binary install configure
113