kopia lustrzana https://github.com/Hamlib/Hamlib
150 wiersze
6.7 KiB
Makefile
150 wiersze
6.7 KiB
Makefile
#!/usr/bin/make -f
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
#export DH_VERBOSE=1
|
|
|
|
PY_INTERPRETER=/usr/bin/python
|
|
|
|
perlversion = `perl -V:version|cut -d\' -f2`
|
|
|
|
configure: configure-stamp
|
|
configure-stamp:
|
|
dh_testdir
|
|
./configure --prefix=/usr --mandir=\$${prefix}/share/man \
|
|
--without-kylix-binding
|
|
|
|
touch configure-stamp
|
|
|
|
build: configure-stamp build-stamp
|
|
build-stamp:
|
|
dh_testdir
|
|
# Add here commands to compile the package.
|
|
$(MAKE)
|
|
$(MAKE) -C doc doc
|
|
touch build-stamp
|
|
|
|
clean:
|
|
dh_testdir
|
|
dh_testroot
|
|
# Add here commands to clean up after the build process.
|
|
[ ! -f Makefile ] || $(MAKE) distclean
|
|
dh_clean
|
|
rm -f build-stamp configure-stamp
|
|
rm -f config.log libltdl/config.log
|
|
rm -f config.status libltdl/config.status
|
|
rm -rf doc/html
|
|
rm -rf `find . -name .libs`
|
|
rm -f lib/termios.o libltdl/ltdl.o
|
|
|
|
install: build
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_clean -k
|
|
dh_installdirs
|
|
|
|
# Add here commands to install the package into debian/tmp
|
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
|
|
|
# Move C++ files out of the way
|
|
# Move the appropriate files into the C++ development package..
|
|
mv $(CURDIR)/debian/tmp/usr/include/hamlib/rigclass.h $(CURDIR)/debian/libhamlib++-dev/usr/include/
|
|
mv $(CURDIR)/debian/tmp/usr/include/hamlib/rotclass.h $(CURDIR)/debian/libhamlib++-dev/usr/include/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib++.a $(CURDIR)/debian/libhamlib++-dev/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib++.la $(CURDIR)/debian/libhamlib++-dev/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib++.so $(CURDIR)/debian/libhamlib++-dev/usr/lib/
|
|
|
|
# Move the appropriate files into the C++ runtime package..
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib++.so.2 $(CURDIR)/debian/libhamlib2++c2/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib++.so.2.0.5 $(CURDIR)/debian/libhamlib2++c2/usr/lib/
|
|
|
|
# Move the appropriate files into the C development package..
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib.so $(CURDIR)/debian/libhamlib-dev/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/*.a $(CURDIR)/debian/libhamlib-dev/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/*.la $(CURDIR)/debian/libhamlib-dev/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/include/hamlib $(CURDIR)/debian/libhamlib-dev/usr/include/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/pkgconfig/hamlib.pc $(CURDIR)/debian/libhamlib-dev/usr/lib/pkgconfig/
|
|
mv $(CURDIR)/debian/tmp/usr/share/aclocal/hamlib.m4 $(CURDIR)/debian/libhamlib-dev/usr/share/aclocal/
|
|
|
|
# Move the appropriate files into the C runtime package..
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib.so.2 $(CURDIR)/debian/libhamlib2/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/libhamlib.so.2.0.5 $(CURDIR)/debian/libhamlib2/usr/lib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/hamlib-*so $(CURDIR)/debian/libhamlib2/usr/lib/
|
|
|
|
# Move the appropriate files into the perl package and do some cleanups
|
|
mv $(CURDIR)/debian/tmp/usr/lib/perl/$(perlversion)/* $(CURDIR)/debian/libhamlib2-perl/usr/lib/perl5
|
|
rm -f $(CURDIR)/debian/libhamlib2-perl/usr/lib/perl5/auto/Hamlib/.packlist
|
|
rm -f $(CURDIR)/debian/libhamlib2-perl/usr/lib/perl5/auto/Hamlib/Hamlib.bs
|
|
rm -f $(CURDIR)/debian/libhamlib2-perl/usr/lib/perl5/perllocal.pod
|
|
mv $(CURDIR)/debian/libhamlib2-perl/usr/lib/perl5/perltest.pl $(CURDIR)/debian/libhamlib2-perl/usr/share/doc/libhamlib2-perl
|
|
|
|
# Move the appropriate files into the python package
|
|
rm $(CURDIR)/debian/tmp/usr/lib/python/Hamlib.py?
|
|
mv $(CURDIR)/debian/tmp/usr/lib/python/* $(CURDIR)/debian/python-libhamlib2/usr/share/python-support/python-libhamlib2
|
|
mv $(CURDIR)/debian/tmp/usr/lib/_Hamlib.so $(CURDIR)/debian/python-libhamlib2/usr/share/python-support/python-libhamlib2
|
|
chmod 0644 $(CURDIR)/bindings/pytest.py
|
|
cp $(CURDIR)/bindings/pytest.py $(CURDIR)/debian/python-libhamlib2/usr/share/doc/python-libhamlib2/
|
|
|
|
# Move the appropriate files into the tcl package
|
|
mv $(CURDIR)/debian/tmp/usr/lib/hamlibtcl* $(CURDIR)/debian/libhamlib2-tcl/usr/lib/hamlib/
|
|
mv $(CURDIR)/debian/tmp/usr/lib/tcl/* $(CURDIR)/debian/libhamlib2-tcl/usr/lib/hamlib/
|
|
cp $(CURDIR)/bindings/tcltest.tcl $(CURDIR)/debian/libhamlib2-tcl/usr/share/doc/libhamlib2-tcl/
|
|
|
|
# Move the appropriate files into the documentation package..
|
|
mv $(CURDIR)/doc/html/* $(CURDIR)/debian/libhamlib-doc/usr/share/doc/hamlib-doc/html
|
|
|
|
# Move the appropriate files into the utils package..
|
|
mv $(CURDIR)/debian/tmp/usr/bin/rigctl $(CURDIR)/debian/libhamlib-utils/usr/bin/
|
|
mv $(CURDIR)/debian/tmp/usr/bin/rotctl $(CURDIR)/debian/libhamlib-utils/usr/bin/
|
|
mv $(CURDIR)/debian/tmp/usr/bin/rigmem $(CURDIR)/debian/libhamlib-utils/usr/bin/
|
|
mv $(CURDIR)/debian/tmp/usr/bin/rigswr $(CURDIR)/debian/libhamlib-utils/usr/bin/
|
|
mv $(CURDIR)/debian/tmp/usr/share/man/man1/rigctl.1 $(CURDIR)/debian/libhamlib-utils/usr/share/man/man1
|
|
mv $(CURDIR)/debian/tmp/usr/share/man/man1/rotctl.1 $(CURDIR)/debian/libhamlib-utils/usr/share/man/man1
|
|
mv $(CURDIR)/debian/tmp/usr/share/man/man1/rigmem.1 $(CURDIR)/debian/libhamlib-utils/usr/share/man/man1
|
|
mv $(CURDIR)/debian/tmp/usr/share/man/man1/rigswr.1 $(CURDIR)/debian/libhamlib-utils/usr/share/man/man1
|
|
mv $(CURDIR)/debian/tmp/usr/sbin/rpc.rigd $(CURDIR)/debian/libhamlib-utils/usr/sbin/
|
|
mv $(CURDIR)/debian/tmp/usr/sbin/rpc.rotd $(CURDIR)/debian/libhamlib-utils/usr/sbin/
|
|
mv $(CURDIR)/debian/tmp/usr/share/man/man8/rpc.rigd.8 $(CURDIR)/debian/libhamlib-utils/usr/share/man/man8
|
|
mv $(CURDIR)/debian/tmp/usr/share/man/man8/rpc.rotd.8 $(CURDIR)/debian/libhamlib-utils/usr/share/man/man8
|
|
|
|
# Build architecture-independent files here.
|
|
binary-indep: build install
|
|
# We have nothing to do by default.
|
|
|
|
# Build architecture-dependent files here.
|
|
binary-arch: build install
|
|
dh_testdir
|
|
dh_testroot
|
|
|
|
dh_installdocs -X INSTALL -X ChangeLog
|
|
dh_installchangelogs
|
|
# dh_link
|
|
dh_strip
|
|
dh_compress
|
|
dh_fixperms
|
|
dh_perl
|
|
|
|
: # Replace all '#!' calls to python with $(PY_INTERPRETER)
|
|
: # and make them executable
|
|
for i in `find debian/python-* -type f`; do \
|
|
sed '1s,#!.*python[^ ]*\(.*\),#! $(PY_INTERPRETER)\1,' \
|
|
$$i > $$i.temp; \
|
|
if cmp --quiet $$i $$i.temp; then \
|
|
rm -f $$i.temp; \
|
|
else \
|
|
mv -f $$i.temp $$i; \
|
|
chmod 755 $$i; \
|
|
echo "fixed interpreter: $$i"; \
|
|
fi; \
|
|
done
|
|
|
|
dh_pysupport -ppython-libhamlib2
|
|
dh_makeshlibs -V -Xalinco -Xaor -Xdrake -Xdummy -Xeasycomm -Xflexradio -Xfodtrack -Xicom -Xjrc -Xkachina -Xkenwood -Xkit -Xlowe -Xmicrotune -Xpcr -Xracal -Xrft -Xrotorez -Xrpc -Xsartek -Xtapr -Xtentec -Xtuner -Xuniden -Xwinradio -Xyaesu -Xkit -Xracal -Xscanti -Xwj -Xtuner -Xlibtcl
|
|
dh_installdeb
|
|
dh_shlibdeps -Xalinco -Xaor -Xdrake -Xdummy -Xeasycomm -Xflexradio -Xfodtrack -Xicom -Xjrc -Xkachina -Xkenwood -Xkit -Xlowe -Xmicrotune -Xpcr -Xracal -Xrft -Xrotorez -Xrpc -Xsartek -Xtapr -Xtentec -Xtuner -Xuniden -Xwinradio -Xyaesu -Xkit -Xracal -Xscanti -Xwj -Xtuner
|
|
dh_gencontrol
|
|
dh_md5sums
|
|
dh_builddeb
|
|
|
|
binary: binary-indep binary-arch
|
|
.PHONY: build clean binary-indep binary-arch binary install configure
|