~ubuntu-branches/debian/jessie/gsmlib/jessie

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura
  • Date: 2013-10-15 13:29:27 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131015132927-1i5iwvj21wue3uvu
Tags: 1.10+20120414.gita5e5ae9a-0.1
* Non-maintainer upload.
* Update to the latest Git version by Vianney Bouchaud.
* Use 3.0 (quilt) source package format.
* Own the run subdirectory (Closes: #689891).
* Don't remove the system user on package remove.
* Fix init script (LP: #30228).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Uncomment this to turn on verbose mode.
4
4
#export DH_VERBOSE=1
5
5
 
6
 
# shared library versions, option 1
7
 
#version=2.0.5
8
 
#major=2
9
 
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
10
 
me_version=`ls gsmlib/.libs/libgsmme*.so.* | \
11
 
 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
12
 
me_major=`ls gsmlib/.libs/libgsmme*.so.* | \
13
 
 awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
14
 
ex_version=`ls ext/.libs/libgsmext*.so.* | \
15
 
 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
16
 
ex_major=`ls ext/.libs/libgsmext*.so.* | \
17
 
 awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
18
 
 
19
 
 
20
6
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
21
7
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
22
8
 
23
 
 
24
 
# FOR AUTOCONF 2.13 ONLY
25
 
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
26
 
  confflags += $(DEB_HOST_GNU_TYPE)
27
 
else
28
 
  confflags += --host $(DEB_BUILD_GNU_TYPE) --build $(DEB_HOST_GNU_TYPE)
29
 
endif
30
 
 
31
 
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
32
 
CFLAGS += -g
33
 
CXXFLAGS += -g
34
 
endif
35
 
 
36
 
configure: configure-stamp
37
 
configure-stamp:
38
 
        dh_testdir
39
 
        # Add here commands to configure the package.
40
 
        CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" INSTALL_PROGRAM=$(INSTALL_PROGRAM) \
41
 
        ./configure $(confflags) --prefix=/usr --mandir=\$${prefix}/share/man \
42
 
        --infodir=\$${prefix}/share/info
43
 
 
44
 
        touch configure-stamp
45
 
 
46
 
build: configure-stamp build-stamp
47
 
build-stamp:
48
 
        dh_testdir
49
 
 
50
 
        # Add here commands to compile the package.
51
 
        $(MAKE)
52
 
 
53
 
        touch build-stamp
54
 
 
55
 
clean:
56
 
        dh_testdir
57
 
        dh_testroot
58
 
 
59
 
        # Add here commands to clean up after the build process.
60
 
        [ ! -f Makefile ] || $(MAKE) distclean
61
 
        rm -f build-stamp configure-stamp config.log config.status po/de.gmo
62
 
 
63
 
        -test -r /usr/share/misc/config.sub && \
64
 
           cp -f /usr/share/misc/config.sub scripts/config.sub
65
 
        -test -r /usr/share/misc/config.guess && \
66
 
           cp -f /usr/share/misc/config.guess scripts/config.guess
67
 
 
68
 
        dh_clean
69
 
 
70
 
install: build
71
 
        dh_testdir
72
 
        dh_testroot
73
 
        dh_clean -k
74
 
        dh_installdirs
75
 
        dh_installdirs -pgsm-utils
76
 
 
77
 
        # Add here commands to install the package into debian/gsmlib.
78
 
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
79
 
        chrpath -d debian/tmp/usr/bin/*
 
9
%:
 
10
        dh $@ --with autoreconf
 
11
 
 
12
override_dh_auto_install:
 
13
        dh_auto_install
80
14
        cp contrib/gsmsmsspool contrib/gsmsmsrequeue debian/tmp/usr/bin
81
15
 
82
 
 
83
 
# Build architecture-independent files here.
84
 
binary-indep: build install
85
 
# We have nothing to do by default.
86
 
 
87
 
# Build architecture-dependent files here.
88
 
binary-arch: build install
89
 
        dh_testdir
90
 
        dh_testroot
91
 
        #
92
 
        # build libgsmlib${major} package by moving files from gsmlib-dev
93
 
        #
94
 
        dh_movefiles -plibgsmme$(me_major)c2a  \
95
 
        usr/lib/libgsmme.so.$(me_major)        \
96
 
        usr/lib/libgsmme.so.$(me_version)    \
97
 
        usr/lib/libgsmext.so.$(ex_major)        \
98
 
        usr/lib/libgsmext.so.$(ex_version)    \
99
 
        usr/share/locale
100
 
 
101
 
        dh_movefiles -plibgsmme-dev     \
102
 
        usr/include                   \
103
 
        usr/lib
104
 
 
105
 
        dh_movefiles -pgsm-utils \
106
 
        usr/bin
107
 
 
108
 
 
109
 
        dh_installdocs
110
 
        dh_installexamples
111
 
        dh_installmenu
112
 
        dh_installinit
113
 
        dh_installcron
114
 
        dh_installman -pgsm-utils debian/*.1 debian/tmp/usr/share/man/man*/*
115
 
        dh_installinfo
116
 
        dh_installchangelogs ChangeLog
117
 
        dh_link
118
 
        dh_strip
119
 
        dh_compress
120
 
        dh_fixperms
121
 
        dh_makeshlibs -V
122
 
        dh_installdeb
123
 
        dh_shlibdeps -ldebian/libgsmme1c2a/usr/lib
124
 
        dh_gencontrol
125
 
        dh_md5sums
126
 
        dh_builddeb
127
 
 
128
 
binary: binary-indep binary-arch
129
 
.PHONY: build clean binary-indep binary-arch binary install configure
 
16
override_dh_auto_test:
 
17
 
 
18
.PHONY: override_dh_auto_install override_dh_auto_test