summaryrefslogtreecommitdiff
path: root/debian/rules
blob: ff6a579597d6e7b0d64cd65333f014cc7c88126e (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
#!/usr/bin/make -f

# make clean does not clean properly
# so building out of source
BUILD = build-tree

LDFLAGS = -Wl,--as-needed

override_dh_auto_configure:
	dh_auto_configure -B $(BUILD) -- \
		--with-lisp=sbcl \
		--with-x \
		LDFLAGS="$(LDFLAGS)"

override_dh_auto_clean:
	rm -rf $(BUILD)

override_dh_install:
	dh_install --list-missing

# AXIOMsys seems already stripped,
# and dh_strip breaks it
override_dh_strip:
	dh_strip -X AXIOMsys

clean build install binary binary-arch binary-indep:
	dh $@ --builddir=$(BUILD)

PACKAGE = open-axiom
SVN_REPO = https://open-axiom.svn.sf.net/svnroot/open-axiom/trunk
SRC_VERSION  := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn~//' )
TARBALL       = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
.PHONY: get-orig-source
get-orig-source:
	rm -rf get-orig-source $(TARBALL)
	mkdir get-orig-source
	svn export -r $(SVN_REVISION) $(SVN_REPO) \
	get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
	GZIP='--best --no-name' 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"