Added README.
[irreco.git] / irreco / debian / rules
blobad62757640cf2ea24859ccb67c1a790f6ed57843
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.
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
13 export DH_VERBOSE=1
14 export IRRECO_DEVELOPER=yes
15 IRRECO_DIR=./irreco
16 BACKEND_DIR=./backend
17 SET_PKG_CONFIG_PATH = export PKG_CONFIG_PATH=`readlink -f ./script/tmp`":$$PKG_CONFIG_PATH"
19 DESTDIR=$(CURDIR)/debian/tmp
22 # Compiler flags
23 CFLAGS = -Wall -g
25 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26 CFLAGS += -O0
27 else
28 CFLAGS += -O2
29 endif
33 # Enable / disable pkg-config file installation.
34 # In other words, check dev flag
35 ifeq (,$(findstring yes,$(IRRECO_DEVELOPER)))
36 IRRECO_CONFIG += --enable-dev=no
37 else
38 IRRECO_CONFIG += --enable-dev=yes
39 endif
42 # shared library versions, option 1
43 version=2.0.5
44 major=2
45 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
46 #version=`ls src/.libs/lib*.so.* | \
47 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
48 #major=`ls src/.libs/lib*.so.* | \
49 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
51 configure: configure-stamp
52 configure-stamp:
53 dh_testdir
54 # Add here commands to configure the package.
55 ./autogen.sh
59 CFLAGS="$(CFLAGS)" ./configure --prefix=/usr $(IRRECO_CONFIG)
60 touch configure-stamp
63 build: build-stamp
64 build-stamp: configure-stamp
65 dh_testdir
67 # Add here commands to compile the package.
68 # Add here commands to compile the package.
69 $(MAKE)
70 # $(MAKE) install DESTDIR=$(DESTDIR)
72 touch $@
74 clean:
75 dh_testdir
76 dh_testroot
77 rm -f build-stamp configure-stamp
79 # Add here commands to clean up after the build process.
80 -$(MAKE) distclean
81 -$(MAKE) clean
82 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
83 cp -f /usr/share/misc/config.sub config.sub
84 endif
85 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
86 cp -f /usr/share/misc/config.guess config.guess
87 endif
89 dh_clean
91 install: build
92 dh_testdir
93 dh_testroot
94 dh_clean -k
95 dh_installdirs
97 # Add here commands to install the package into debian/irreco.
98 # Actually installs to debian/tmp
99 #$(MAKE) DESTDIR=$(DESTDIR) install
101 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
102 # Build architecture-independent files here.
103 binary-indep: build install
104 # We have nothing to do by default.
106 # Build architecture-dependent files here.
107 binary-arch: build install
108 dh_testdir
109 dh_testroot
110 # dh_installchangelogs ChangeLog
111 # dh_installdocs
112 # dh_installexamples
113 dh_install --sourcedir=debian/tmp
114 # dh_install
115 # dh_installmenu
116 # dh_installdebconf
117 # dh_installlogrotate
118 # dh_installemacsen
119 # dh_installpam
120 # dh_installmime
121 # dh_installinit
122 # dh_installcron
123 # dh_installinfo
124 # dh_installman
125 dh_link
126 dh_strip
127 dh_compress
128 dh_fixperms
129 # dh_perl
130 # dh_python
131 # dh_makeshlibs
132 dh_installdeb
133 dh_shlibdeps
134 dh_gencontrol
135 dh_md5sums
136 dh_builddeb
138 binary: binary-indep binary-arch
139 .PHONY: build clean binary-indep binary-arch binary install configure