File debian.rules of Package talys-2dev
#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. DH_VERBOSE = 1 # see FEATURE AREAS in dpkg-buildflags(1) #export DEB_BUILD_MAINT_OPTIONS = hardening=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append CFLAGS #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed mname = talys name = $(shell dpkg-parsechangelog | sed -n -e 's/^Source: //p') version = $(shell dpkg-parsechangelog | sed -n -e "s/^Version:\ \+\(.*\)[-\ ].*/\1/p") sources_path = /usr/src/packages/SOURCES/ dataVersion = 2.1 dname = $(mname)-$(dataVersion) buildroot = /usr/src/packages/BUILD/debian/$(name) _bindir = /usr/bin _docdir = /usr/share/doc _datadir = /usr/share %: dh $@ override_dh_auto_build: sed -i "s| codedir.*| codedir = '$(_datadir)/$(dname)/'|" source/machine.f90 cd source ;\ ls *.o > /dev/null 2>&1 && rm -rf *.o ;\ ls *.mod > /dev/null 2>&1 && rm -rf *.mod ;\ ls *.f* > /dev/null 2>&1 && gfortran -w -c *.f* ;\ gfortran *.o -o $(mname)-$(version) ;\ ls *.o > /dev/null 2>&1 && rm -rf *.o ;\ ls *.mod > /dev/null 2>&1 && rm -rf *.mod ;\ exit 0 override_dh_auto_install: install -d $(buildroot)$(_bindir) install -m755 source/$(mname)-$(version) $(buildroot)$(_bindir)/ rm -rf source/$(mname)-$(version)