r2149: *** 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 prefix  := debian/$(debpkg)
14
15 INSTALL := install
16 INSTALLFLAGS    := -g root -o root -m 0644
17 INSTALLDIRFLAGS := -d -g root -o root -m 0755
18
19 SOURCEDIR       := $(prefix)/usr/share/common-lisp/source/${pkg}
20 DOCDIR          := $(prefix)/usr/share/doc/${debpkg}
21
22 UPSTREAM_VER    := $(shell sed -n -e "s/${debpkg} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog |head -1)
23
24 pkg-ver         := $(debpkg)-$(UPSTREAM_VER)
25 clc-source      := $(SOURCEDIR)-$(UPSTREAM_VER)
26
27 configure: configure-stamp
28 configure-stamp:
29         dh_testdir
30         # Add here commands to configure the package.
31
32         touch configure-stamp
33
34
35 build: build-stamp
36
37 build-stamp: configure-stamp 
38         dh_testdir
39
40         # Add here commands to compile the package.
41         # Make doc isn't necessary because the docs are in the upstream version
42         # $(MAKE) doc
43
44         touch build-stamp
45
46 clean:
47         dh_testdir
48         dh_testroot
49         rm -f build-stamp configure-stamp
50
51         # Add here commands to clean up after the build process.
52         -$(MAKE) clean
53         rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
54
55         dh_clean
56
57 install: build
58         dh_testdir
59         dh_testroot
60         dh_clean -k
61         dh_installdirs
62
63         # Add here commands to install the package into debian/uffi.
64         $(INSTALL) $(INSTALLDIRFLAGS) $(clc-source)
65         $(INSTALL) $(INSTALLDIRFLAGS) $(clc-source)/mcl
66         $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(clc-source)
67         $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(clc-source)/mcl
68         $(INSTALL) $(INSTALLFLAGS) doc/html/* $(DOCDIR)/html
69         cp doc/uffi.pdf doc/cl-uffi.pdf
70         rm -f doc/cl-uffi.pdf.gz
71         gzip doc/cl-uffi.pdf
72         $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
73         rm -f doc/cl-uffi.pdf.gz
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_link $(clc-source) $(pkg)
98         dh_strip
99         dh_compress
100         dh_fixperms
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