File: rules

package info (click to toggle)
mathicgb 1.0~git20170104-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,708 kB
  • ctags: 3,297
  • sloc: cpp: 22,171; sh: 217; makefile: 120
file content (34 lines) | stat: -rwxr-xr-x 1,058 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

EXAMPLESDIR = $(CURDIR)/debian/mathicgb/usr/share/doc/mathicgb/examples

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- GTEST_PATH=/usr/src/gtest --enable-shared

override_dh_fixperms:
	dh_fixperms
	#dh_fixperms skips files in examples directory
	chmod 644 $(EXAMPLESDIR)/*.ideal

override_dh_strip:
	dh_strip --dbgsym-migration='libmathicgb-dbg (<< 1.0~git20150904-2~)'

get-orig-source:
	wget https://github.com/Macaulay2/mathicgb/archive/master.tar.gz
	git checkout upstream
	git pull https://github.com/Macaulay2/mathicgb
	grep -Po '(?<=AC_INIT\(\[mathicgb\], \[).*(?=\]\))' configure.ac \
		> version
	git show HEAD^:configure.ac | \
		grep -Po '(?<=AC_INIT\(\[mathicgb\], \[).*(?=\]\))' > oldversion
	if test `cat oldversion` = `cat version` ; then \
		echo "`cat version`~git`date -d @\`git log -1 --pretty=format:%ct\` +%Y%m%d`" > version; \
	fi
	git checkout master
	mv -v master.tar.gz ../mathicgb_`cat version`.orig.tar.gz
	rm version oldversion