r2152: *** 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 UPSTREAM_VER    := $(shell sed -n -e "s/${debpkg} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog |head -1)
20
21 pkg-ver         := $(debpkg)-$(UPSTREAM_VER)
22 clc-source      := usr/share/common-lisp/source
23 clc-systems     := usr/share/common-lisp/systems
24 clc-uffi        := $(clc-source)/$(pkg)-$(UPSTREAM_VER)
25
26 srcdir          := $(prefix)/$(clc-uffi)
27 DOCDIR          := $(prefix)/usr/share/doc/${debpkg}
28
29
30 configure: configure-stamp
31 configure-stamp:
32         dh_testdir
33         # Add here commands to configure the package.
34
35         touch configure-stamp
36
37
38 build: build-stamp
39
40 build-stamp: configure-stamp 
41         dh_testdir
42
43         # Add here commands to compile the package.
44         # Make doc isn't necessary because the docs are in the upstream version
45         # $(MAKE) doc
46
47         touch build-stamp
48
49 clean:
50         dh_testdir
51         dh_testroot
52         rm -f build-stamp configure-stamp
53
54         # Add here commands to clean up after the build process.
55         -$(MAKE) clean
56         rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
57
58         dh_clean
59
60 install: build
61         dh_testdir
62         dh_testroot
63         dh_clean -k
64         dh_installdirs
65
66         # Add here commands to install the package into debian/uffi.
67         $(INSTALL) $(INSTALLDIRFLAGS) $(srcdir)
68         $(INSTALL) $(INSTALLDIRFLAGS) $(srcdir)/mcl
69         $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(srcdir)
70         $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(clc-source)/mcl
71         $(INSTALL) $(INSTALLFLAGS) doc/html/* $(DOCDIR)/html
72         cp doc/uffi.pdf doc/cl-uffi.pdf
73         rm -f doc/cl-uffi.pdf.gz
74         gzip doc/cl-uffi.pdf
75         $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
76         rm -f doc/cl-uffi.pdf.gz
77
78 # Build architecture-independent files here.
79 binary-indep: build install
80
81
82 # Build architecture-dependent files here.
83 binary-arch: build install
84         dh_testdir
85         dh_testroot
86 #       dh_installdebconf       
87         dh_installdocs
88         dh_installexamples examples/*.cl
89 #       dh_installmenu
90 #       dh_installlogrotate
91 #       dh_installemacsen
92 #       dh_installpam
93 #       dh_installmime
94 #       dh_installinit
95 #       dh_installcron
96 #       dh_installman
97 #       dh_installinfo
98 #       dh_undocumented
99         dh_installchangelogs ChangeLog
100         dh_strip
101         dh_compress
102         dh_fixperms
103         dh_link -p $(pkg) $(clc-uffi) $(clc-source)/$(pkg)
104 #       dh_makeshlibs
105         dh_installdeb
106 #       dh_perl
107         dh_shlibdeps
108         dh_gencontrol
109         dh_md5sums
110         dh_builddeb
111
112 binary: binary-indep binary-arch
113 .PHONY: build clean binary-indep binary-arch binary install configure
114