File debian.rules of Package ngspice
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
NAME = ngspice
VERSION = 44.2
DESTDIR = $(CURDIR)/debian/tmp
%:
dh $@
binary:
dh_testdir
dh_testroot
dh_installchangelogs
dh_prep
dh_installdirs
export CFLAGS="%{optflags} -fPIE"
export LDFLAGS="-pie"
mkdir exe lib
cd exe; \
../configure \
--prefix="/usr" \
--libdir="/usr/lib" \
--disable-debug \
--with-x \
--with-readline=yes \
--enable-xspice \
--enable-cider \
--enable-openmp \
--enable-osdi \
--enable-predictor \
cd lib; \
../configure \
--prefix="/usr" \
--libdir="/usr/lib" \
--disable-debug \
--with-ngshared \
--with-readline=yes \
--enable-xspice \
--enable-cider \
--enable-openmp \
--enable-osdi \
--enable-predictor \
cd exe; make
cd lib; make
cd exe; make install DESTDIR=$(DESTDIR)
cd lib; make install DESTDIR=$(DESTDIR)
chmod -x ANALYSES AUTHORS BUGS DEVICES FAQ NEWS README
find $(DESTDIR) -type f -name "*.la" -delete -print
# mkdir $(DESTDIR)/usr/x86_64-linux-gnu
# mv $(DESTDIR)/usr/lib/* $(DESTDIR)/usr/x86_64-linux-gnu/
# mv $(DESTDIR)/usr/x86_64-linux-gnu $(DESTDIR)/usr/lib
echo "==================================================="
find $(DESTDIR)
echo "==================================================="
dh_installdeb
dh_install
dh_missing --list-missing
dh_shlibdeps
dh_compress
dh_gencontrol
dh_md5sums
dh_builddeb # only for binary packages ?
clean:
dh_testdir
dh_testroot
dh_clean
rm -fr exe lib