~network-manager/network-manager-applet/ubuntu.0.7.1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/make -f

DEB_SOURCE := $(shell dpkg-parsechangelog | grep Source: | sed -e 's/Source: //')
DEB_VERSION := $(shell dpkg-parsechangelog | grep Version: | sed -e 's/Version: //')
DEB_UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/-[^-]*$$//')

DEB_AUTO_UPDATE_LIBTOOL = pre
DEB_AUTO_UPDATE_AUTOHEADER = 2.50
DEB_AUTO_UPDATE_ACLOCAL = 1.9
DEB_AUTO_UPDATE_AUTOMAKE = 1.9 -a -c -f
DEB_AUTO_UPDATE_AUTOCONF = 2.50

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/class/gnome.mk

DEB_CONFIGURE_EXTRA_FLAGS = \
	--without-gnutls \
	--with-nss \
	--with-mbca \
	$(NULL)

GIT_URL := git://git.gnome.org/network-manager-applet

build/network-manager-gnome::
	/usr/bin/docbook-to-man debian/nm-applet.sgml > debian/nm-applet.1

common-binary-arch::
	rm -rf debian/network-manager-gnome/usr/include/
	cp -f debian/network-manager-gnome/usr/share/icons/hicolor/22x22/apps/nm-vpn-active-lock.png \
		debian/network-manager-gnome/usr/share/icons/hicolor/22x22/apps/nm-vpn-lock.png
	cp -f debian/network-manager-gnome/usr/share/icons/hicolor/22x22/apps/nm-device-wired.png \
		debian/network-manager-gnome/usr/share/icons/hicolor/22x22/apps/nm-device-wired-autoip.png

clean::
	rm -f po/*.gmo
	rm -f debian/*.1
	rm -f gtk-doc.make
	echo "# empty file" > aclocal.m4

pre-build::
	intltoolize -f -c

get-orig-source::
	set -e; if echo $(DEB_VERSION) | grep -c "git"; \
	then \
		git_version=`echo $(DEB_VERSION) | sed -e 's/^.*git\.*\([0-9]*\.\)*\(.*\)-.*$$/\2/g'`; \
	else \
		git_version=NETWORKMANAGER_APPLET_$(shell echo $(DEB_UPSTREAM_VERSION) | sed -e 's/\./_/g'); \
		fi; \
	tmpdir=`mktemp -d -t`; \
	cd $$tmpdir; \
		echo "cloning upstream repository ..."; \
		git clone $(GIT_URL); echo "getting specific upstream revision/tag: $$git_version"; \
		cd `ls | head -n 1`; git checkout -b orig $$git_version; \
		cd ..; tar --exclude=.git -cvzf $(CURDIR)/$(DEB_SOURCE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz `ls | head -n 1`; \
		cd $(CURDIR); rm -rf $$tmpdir