summaryrefslogtreecommitdiff
path: root/waterfox-g/debian/rules
blob: 21db46085ff1e1b0e8abec4dd6f872c921853668 (plain)
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
#!/usr/bin/make -f
# -*- makefile -*-

export SHELL=/bin/bash
export MOZCONFIG=$(shell pwd)/debian/mozconfig
export MOZ_NOSPAM:=1
export MOZ_SOURCE_REPO=https://github.com/WaterfoxCo/Waterfox
# stackrpms,3
export MOZ_SOURCE_CHANGESET=$(shell awk -F ': ' '/^commit:/ {print $$2; exit}' ../SOURCES/waterfox-g.obsinfo)
export WF_VERSION=$(shell awk -F ': ' '/^version:/ {print "G"$$2; exit}' ../SOURCES/waterfox-g.obsinfo)
export TODAY_DATE=$(shell date +%Y-%m-%d)
export LC_ALL=C.UTF-8
export JOBS=$(shell echo $(shell grep -c ^processor /proc/cpuinfo)\/2 | bc)
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system

export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
include /usr/share/dpkg/buildflags.mk
export CXXFLAGS CFLAGS LDFLAGS

%:
	dh $@

override_dh_auto_configure:

override_dh_auto_clean:
	dh_auto_clean
	find . -name '*.pyc' -delete

override_dh_auto_build:
	$$(pwd)/debian/build.sh

override_dh_auto_install:
	chmod +x $$(pwd)/debian/waterfox-g-bin.sh
	# stackrpms,4
	DESTDIR=$$(pwd)/debian/waterfox-g ./mach install
	rm -rf $$(pwd)/debian/waterfox-g/usr/lib/waterfox-g/dictionaries
	rm -rf $$(pwd)/debian/waterfox-g/usr/lib/waterfox-g/waterfox-g-bin
	sed -i "s/__DATE__/$$TODAY_DATE/g" $$(pwd)/debian/waterfox-g.appdata.xml.in
	# stackrpms,2
	sed -e "s/__VERSION__/$$WF_VERSION/g" $$(pwd)/debian/waterfox-g.appdata.xml.in > $$(pwd)/debian/waterfox-g/usr/share/metainfo/waterfox-g.appdata.xml
	mv $$(pwd)/debian/waterfox-g-wayland-bin.sh $$(pwd)/debian/waterfox-g-wayland/usr/bin/waterfox-g-wayland

override_dh_shlibdeps:
	dh_shlibdeps -l /usr/lib/waterfox-g/waterfox-g

override_dh_strip_nondeterminism:
bgstack15