Version 2.0.2-2
[physicsfs] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12
13 BUILD_DIR:=builddir
14
15 CFLAGS = -Wall -g
16
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -O0
19 else
20         CFLAGS += -O2
21 endif
22
23 # shared library versions, option 1
24 version=2.0.5
25 major=2
26 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
27 #version=`ls src/.libs/lib*.so.* | \
28 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
29 #major=`ls src/.libs/lib*.so.* | \
30 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
31
32 builddir:
33         mkdir -p $(BUILD_DIR)
34
35 configure: configure-stamp
36 configure-stamp: builddir
37         dh_testdir
38         # Add here commands to configure the package.
39         cd $(BUILD_DIR) && cmake -DCMAKE_INSTALL_PREFIX=/usr ..
40
41         touch configure-stamp
42
43
44 build: build-stamp
45 build-stamp: configure-stamp 
46         dh_testdir
47
48         # Add here commands to compile the package.
49         cd $(BUILD_DIR) && $(MAKE)
50
51         touch $@
52
53 clean:
54         dh_testdir
55         dh_testroot
56         rm -f build-stamp configure-stamp
57
58         # Add here commands to clean up after the build process.
59         -cd $(BUILD_DIR) && $(MAKE) clean
60         -rm -rf $(BUILD_DIR)
61
62         dh_clean 
63
64 install: build
65         dh_testdir
66         dh_testroot
67         dh_clean -k 
68         dh_installdirs
69
70         # Add here commands to install the package into debian/tmp
71         cd $(BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
72
73
74 # Build architecture-independent files here.
75 binary-indep: build install
76 # We have nothing to do by default.
77
78 # Build architecture-dependent files here.
79 binary-arch: build install
80         dh_testdir
81         dh_testroot
82         dh_installchangelogs CHANGELOG.txt
83         dh_installdocs
84 #       dh_installexamples
85         dh_install --sourcedir=debian/tmp
86 #       dh_installmenu
87 #       dh_installdebconf       
88 #       dh_installlogrotate
89 #       dh_installemacsen
90 #       dh_installpam
91 #       dh_installmime
92 #       dh_installinit
93 #       dh_installcron
94 #       dh_installinfo
95 #       dh_installman
96         dh_link
97         dh_strip
98         dh_compress
99         dh_fixperms
100 #       dh_perl
101 #       dh_python
102         dh_makeshlibs
103         dh_installdeb
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