[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Pilot-link package (fwd)



>>>>> "Dermot" == Dermot John Bradley <bradley@oldcolo.com> writes:

    Dermot> Now for a cry for help :-( Is any one familiar with
    Dermot> fscking libtool? As part of debian/rules for pilot-link
    Dermot> I'm now moving the libraries (libpisock.so and
    Dermot> libpisock.a) out of pilot-link into separate package.
    Dermot> Once I do this the dh_shlibdeps call for pilot-link fails
    Dermot> (the binaries can't find the shared library as it isn't
    Dermot> installed yet).

I've run into this very problem. Here's my solution, and this is
how I build the gimp package, which depends on 'libgimp1', which
is built from the same upstream source.

Note the command:

LD_LIBRARY_PATH=$(shell pwd)/debian/tmp/usr/lib dh_shlibdeps -pgimp

This is what the secret is. Replace debian/tmp/usr/lib with whatever
directory the pilot libraries are in, and put this command (or an
equivalent :) into the target for the main pilot-link binaries.

Ben

#!/usr/bin/make -f
# debian/rules file for the GIMP packages

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

build: build-stamp
build-stamp:
	dh_testdir
	automake
	aclocal
	autoconf
	# Add here commands to compile the pacckage.
	./configure --prefix=/usr
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp install-stamp
	# Add here commands to clean up after the build process.
	-$(MAKE) clean
	-$(MAKE) distclean
	rm -rf debian/{gimp,gimp-nonfree,libgimp1,libgimp-dev}
	find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '*.P' -o -name 'Makefile' | xargs rm -rf
	-rm app/gimp
	dh_clean

# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install gimp-nonfree gimp libgimp-dev libgimp1

install: install-stamp
install-stamp: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs usr/X11R6/bin
	$(MAKE) prefix=`pwd`/debian/tmp/usr install
	mv debian/tmp/usr/bin/gimp debian/tmp/usr/X11R6/bin
	touch install-stamp

libgimp1: build install
	dh_testdir -plibgimp1 
	dh_testroot -plibgimp1
#	dh_clean -k -plibgimp1 
	dh_installdirs -plibgimp1
	rm -rf debian/tmp/usr/bin debian/tmp/usr/X11R6 debian/tmp/usr/include \
	  debian/tmp/usr/share debian/tmp/usr/lib/*.la
#	$(MAKE) prefix=`pwd`/debian/tmp/usr install
#	dh_movefiles -plibgimp1
#	rm debian/tmp/usr/lib/*.{so,la,a}
#	rm -rf debian/tmp/usr/{include,info,share}
#	rm -rf debian/tmp/usr/lib/gimp
#	rm -rf debian/tmp/usr/bin
	dh_installdocs -plibgimp1
	dh_installchangelogs -plibgimp1
	dh_strip -plibgimp1
	dh_compress -plibgimp1
	dh_fixperms -plibgimp1
	dh_installdeb -plibgimp1
	dh_shlibdeps -plibgimp1
	dh_gencontrol -plibgimp1
	dh_makeshlibs -plibgimp1 -V
	dh_md5sums -plibgimp1
	dh_builddeb -plibgimp1

gimp: build install
	dh_testdir -pgimp 
	dh_testroot -pgimp
	dh_clean -k -pgimp 
	dh_installdirs -pgimp usr/X11R6/man/man1
	# Add here commands to install the files into debian/tmp
	dh_movefiles -pgimp
	-rm -f install-stamp
	cp docs/gimp.1 debian/gimp/usr/X11R6/man/man1
#	$(MAKE) prefix=`pwd`/debian/gimp/usr install
#	install -d debian/gimp/usr/X11R6/bin
#	mv debian/gimp/usr/bin/gimp debian/gimp/usr/X11R6/bin/gimp
#	install -d debian/gimp-nonfree/usr/lib/gimp/0.99/plug-ins
#	rm -rf debian/gimp/usr/{include,info}
#	find debian/gimp/usr/lib -maxdepth 1 \( -type f -or -type l \) \
#	  | xargs rm
#	mv debian/gimp/usr/lib/gimp/0.99/plug-ins/{gif,tiff} \
#	  debian/gimp-nonfree/usr/lib/gimp/0.99/plug-ins
	dh_installdocs -pgimp debian/README.debian docs/*.txt \
	  README NOTES
	dh_installchangelogs -pgimp ChangeLog
	dh_strip -pgimp
	dh_compress -pgimp
	dh_fixperms -pgimp
	dh_installmenu -pgimp
	dh_installdeb -pgimp
	LD_LIBRARY_PATH=$(shell pwd)/debian/tmp/usr/lib dh_shlibdeps -pgimp
	dh_gencontrol -pgimp
#	dh_makeshlibs -pgimp -V 'libgimp1 (>= 0.99.23)'
	dh_md5sums -pgimp
	dh_builddeb -pgimp


gimp-nonfree: build install
	dh_testdir -pgimp-nonfree
	dh_testroot -pgimp-nonfree
	dh_clean -k -pgimp-nonfree
	dh_movefiles -pgimp-nonfree
	-rm -f install-stamp
#	-rm debian/gimp-nonfree.substvars
#	-find debian/gimp-nonfree -not -type d -and -not \( -name 'gif' -or \
#	  -name 'tiff' \) | xargs rm
	dh_installdirs -pgimp-nonfree
	dh_installdocs -pgimp-nonfree
	dh_installchangelogs -pgimp-nonfree
	dh_strip -pgimp-nonfree
	dh_compress -pgimp-nonfree
	dh_fixperms -pgimp-nonfree
	dh_installdeb -pgimp-nonfree
	LD_LIBRARY_PATH=$(shell pwd)/debian/tmp/usr/lib dh_shlibdeps -pgimp-nonfree
	dh_gencontrol -pgimp-nonfree
#	dh_makeshlibs -pgimp-nonfree
	dh_md5sums -pgimp-nonfree
	dh_builddeb -pgimp-nonfree

libgimp-dev: build install
	dh_testdir -plibgimp-dev
	dh_testroot -plibgimp-dev
	dh_clean -plibgimp-dev -k
	dh_installdirs -plibgimp-dev
	dh_movefiles -plibgimp-dev
	-rm -f install-stamp
	# Add here commands to install the files into debian/tmp
#	$(MAKE) prefix=`pwd`/debian/libgimp-dev/usr install
#	rm -rf debian/libgimp-dev/usr/lib/gimp
#	find debian/libgimp-dev/usr/lib \( -type f -or -type l \) -and ! \( -name \*.so -or -name \*.a \) | xargs rm
#	rm -rf debian/libgimp-dev/usr/{bin,share}
	dh_installdocs -plibgimp-dev
	dh_installchangelogs -plibgimp-dev
	dh_strip -plibgimp-dev
	dh_compress -plibgimp-dev
	dh_fixperms -plibgimp-dev
	dh_installdeb -plibgimp-dev
	dh_shlibdeps -plibgimp-dev
	dh_gencontrol -plibgimp-dev
#	dh_makeshlibs -plibgimp-dev
	dh_md5sums -plibgimp-dev
	dh_builddeb -plibgimp-dev

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary

-- 
Brought to you by the letters T and B and the number 14.
"Hello! We are only joke. It is funny enough." -- Orz, SCII
Ben Gertzfield <http://www.imsa.edu/~wilwonka/> Finger me for my public
PGP key. I'm on FurryMUCK as Che, and EFNet and YiffNet IRC as Che_Fox.


--
To UNSUBSCRIBE, email to debian-pilot-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: