From b7bcad3164c6d94bb4f9a626982145eefa40e346 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Sun, 8 Jul 2012 10:49:08 +0000 Subject: Added support for lib symlinks in deb package. --- debian/rules | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index e4106ff75c..c41f02d4fb 100755 --- a/debian/rules +++ b/debian/rules @@ -50,15 +50,21 @@ install: build dh_installdirs # Add here commands to install the package into debian/secondlife-viewer. - #$(MAKE) DESTDIR=$(CURDIR)/debian/secondlife-viewer install - for file in $$(find $(SRCDIR) -type f | sed 's~$(SRCDIR)/~~'); do \ + for file in $$(find $(SRCDIR) -type f -o -type l | sed 's~$(SRCDIR)/~~'); do \ # create containing directory \ install -v -m 755 -o root -g root -d "$$(dirname "$(DESTDIR)/$(INSTALLDIR)/$$file")"; \ PERM=644; \ if [ -x "$(SRCDIR)/$$file" ]; then \ PERM=755; \ fi; \ - install -v -m $$PERM -o root -g root "$(SRCDIR)/$$file" "$(DESTDIR)/$(INSTALLDIR)/$$file"; \ + if [ -L "$(SRCDIR)/$$file" ]; then \ + REAL="$$( readlink -f $(SRCDIR)/$$file )"; \ + RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(SRCDIR)/~~' )"; \ + echo dh_link "$(INSTALLDIR)/$$RELATIVE" "$(INSTALLDIR)/$$file" ; \ + dh_link "$(INSTALLDIR)/$$RELATIVE" "$(INSTALLDIR)/$$file" ; \ + else \ + install -v -m $$PERM -o root -g root "$(SRCDIR)/$$file" "$(DESTDIR)/$(INSTALLDIR)/$$file"; \ + fi; \ done dh_link /$(INSTALLDIR)/secondlife /usr/bin/secondlife dh_link $(BASEDIR)/SecondLife-i686-$(VIEWER_VERSION) $(BASEDIR)/SecondLife -- cgit v1.2.3