FriCAS Code
Brought to you by:
whebisch
#!/usr/bin/make -f
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
distribution = $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}')
CFLAGS = -g -O2 -Wall
configure: configure-stamp
configure-stamp:
dh_testdir
dh_testroot
mkdir -p debian/build && cd debian/build && \
CFLAGS="$(CFLAGS)" "$(CURDIR)/configure" \
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --enable-gmp --with-x
sed -n "s#.*\[FriCAS\], \[\(.*\)\],#\1#p" configure.ac \
> debian/version
touch $@
build: build-stamp
build-stamp: configure-stamp
dh_testdir
dh_testroot
cd debian/build && \
$(MAKE)
touch $@
install: build
dh_testdir
dh_testroot
dh_prep
rm -rf debian/tmp
cd "$(CURDIR)/debian/build" && \
$(MAKE) install DESTDIR="$(CURDIR)/debian/tmp"
sed -e "s#VERSION#$(shell cat debian/version)#" \
-e "s#DATE#$(shell date -R)#" \
debian/changelog.in > debian/changelog
clean:
dh_testdir
rm -f debian/version debian/changelog
rm -f configure-stamp build-stamp
rm -rf debian/build
dh_clean
binary-arch: build
binary-arch: build install
dh_testdir
dh_testroot
dh_install
dh_installchangelogs
dh_installmenu
dh_link
dh_strip -XAXIOMsys
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: configure build clean binary-indep binary-arch binary
# vim: ts=8 sw=8