File: rules

package info (click to toggle)
mono-fuse 0.4.2+dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,112 kB
  • ctags: 488
  • sloc: sh: 8,858; xml: 6,742; cs: 2,406; ansic: 481; makefile: 187
file content (65 lines) | stat: -rwxr-xr-x 2,101 bytes parent folder | download | duplicates (2)
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
60
61
62
63
64
65
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

MAKEFILE = $(firstword $(MAKEFILE_LIST))
DEBIAN_DIR = $(dir $(MAKEFILE))
SOURCE_DIR = $(DEBIAN_DIR)/..

DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2)
DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Version | cut -d" " -f2)
SOURCE_VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1)
VERSION = $(shell echo $(SOURCE_VERSION) | sed 's/+dfsg.*//')

include /usr/share/cli-common/cli.make

%:
	dh $@

override_dh_auto_configure: autoreconf-stamp
	dh_auto_configure -- CSC=/usr/bin/mono-csc MCS=/usr/bin/mono-csc

autoreconf: autoreconf-stamp
autoreconf-stamp:
	autoreconf -f -i -s -I .
	touch $@

override_dh_makeclilibs:
	# disabled

override_dh_clean:
	dh_clean

	rm -f autoreconf-stamp

	# delete generated autofoo stuff from above
	find . -name "Makefile.in" -delete
	rm -f config.status config.sub config.guess configure config.h.in ltmain.sh missing install-sh aclocal.m4 depcomp INSTALL

	rm -f example/HelloFS/Mono.Fuse.dll.mdb example/HelloFS/HelloFS.exe.mdb example/RedirectFS/RedirectFS-FH.exe

get-orig-source:
	rm -rf $@
	mkdir -p $@
	uscan \
		--package $(DEB_SOURCE_NAME) \
		--watchfile $(DEBIAN_DIR)/watch \
		--upstream-version $(VERSION) \
		--download-version $(VERSION) \
		--destdir $@ \
		--force-download \
		--rename \
		--repack
	mkdir -p $@/repack
	tar zx -C $@/repack -f $@/$(DEB_SOURCE_NAME)_$(VERSION).orig.tar.gz 
	mv $@/repack/* $@/$(DEB_SOURCE_NAME)-$(SOURCE_VERSION) || ( mkdir $@/$(DEB_SOURCE_NAME)-$(SOURCE_VERSION) && mv $@/repack/* $@/$(DEB_SOURCE_NAME)-$(SOURCE_VERSION) )
	rm -fr $@/$(DEB_SOURCE_NAME)-$(SOURCE_VERSION)/.git \
               $@/$(DEB_SOURCE_NAME)-$(SOURCE_VERSION)/autom4te.cache \
	       $@/$(DEB_SOURCE_NAME)-$(SOURCE_VERSION)/src/Mono.Fuse/create-native-map.exe
	tar c -C $@ $(DEB_SOURCE_NAME)-$(SOURCE_VERSION) -f $(DEB_SOURCE_NAME)_$(SOURCE_VERSION).orig.tar
	gzip -9fn $(DEB_SOURCE_NAME)_$(SOURCE_VERSION).orig.tar
	rm -r $@

.PHONY: get-orig-source