File: rules

package info (click to toggle)
marionnet 0.90.6+bzr508-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,532 kB
  • sloc: ml: 18,130; sh: 5,384; xml: 1,152; makefile: 1,003; ansic: 275
file content (57 lines) | stat: -rwxr-xr-x 2,371 bytes parent folder | download
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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

%:
	dh $@ --with ocaml --with systemd

override_dh_auto_build:
	cp -f po/messages.pot po/messages.pot.orig
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	rm debian/marionnet/usr/share/marionnet/COPYING # remove duplicate copyright file
	rm debian/marionnet/usr/share/marionnet/images/Artistic
	rm debian/marionnet/usr/share/marionnet/images/lgpl-3.0.txt
	if [ -e debian/marionnet/usr/sbin/marionnet-daemon.native ]; then \
		mv debian/marionnet/usr/sbin/marionnet-daemon.native debian/marionnet/usr/sbin/marionnet-daemon ; \
		mv debian/marionnet/usr/bin/marionnet.native debian/marionnet/usr/bin/marionnet ; \
	        rm debian/marionnet/usr/sbin/marionnet-daemon.byte ; \
	        rm debian/marionnet/usr/bin/marionnet.byte ; \
	else \
		mv debian/marionnet/usr/sbin/marionnet-daemon.byte debian/marionnet/usr/sbin/marionnet-daemon ;\
		mv debian/marionnet/usr/bin/marionnet.byte debian/marionnet/usr/bin/marionnet ; \
	fi
	# Add symlink in $PATH for port-helper. That's needed because the marionnet kernel
	# call it directly
	if [ "$(DEB_HOST_ARCH)" = "amd64" ]; then \
		dh_link usr/lib64/uml/port-helper usr/bin/port-helper ; \
	else \
		dh_link usr/lib/uml/port-helper usr/bin/port-helper ; \
	fi


override_dh_auto_clean:
	dh_auto_clean
	if [ -f po/messages.pot.orig ]; then mv po/messages.pot.orig po/messages.pot; fi

# see https://launchpad.net/marionnet/trunk
PACKAGE = marionnet
SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
BZR_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/bzr//' )
TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
get-orig-source:
	rm -rf get-orig-source $(TARBALL)
	mkdir get-orig-source
	bzr branch -r $(BZR_REVISION) lp:$(PACKAGE)/trunk get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
	make -C get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig meta.ml.released
	rm get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/meta.ml
	rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/.bzr
	GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
	rm -rf get-orig-source
	echo "  "$(TARBALL)" created; move it to the right destination to build the package"

.PHONY: get-orig-source