aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorJason Woodward2005-06-08 20:48:06 +0000
committerJason Woodward2005-06-08 20:48:06 +0000
commit60fc8b8a1f6ce00fe06f3f5f8eb8e5dc769cd148 (patch)
tree1b69bd0defff957dce26fb524ba70d11791186e0 /Makefile.am
parent2a57074450a147f071ca1bbd7744d0f68e6c7cc1 (diff)
downloadgslapt-60fc8b8a1f6ce00fe06f3f5f8eb8e5dc769cd148.tar.gz
added autogenerated doinst.sh script which should detect whether gksudo, gksu, gnomesu, or kdesu are installed and update the .desktop file accordingly
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 6ece9e7..1f9622a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,6 +43,9 @@ pkg: all
install slack-required $(SLACKPKGBUILDDIR)/install/
chown root:bin $(SLACKPKGBUILDDIR)/$(sbindir)
chown root:bin $(SLACKPKGBUILDDIR)/$(sbindir)/@PACKAGE@
+ @echo -n DESKTOPFILE= > $(SLACKPKGBUILDDIR)/install/doinst.sh
+ @echo "$(DESTDIR)/$(datadir)/applications/gslapt.desktop" |sed -re "s/^\/+//" >> $(SLACKPKGBUILDDIR)/install/doinst.sh
+ @echo 'if [ -f $$DESKTOPFILE ]; then if [ -x usr/bin/gksudo ]; then sed -i.bak -re "s/(Exec=)(\/usr\/sbin\/gslapt)/\1gksudo \2/" $$DESKTOPFILE; elif [ -x usr/bin/gksu ]; then sed -i.bak -re "s/(Exec=)(\/usr\/sbin\/gslapt)/\1gksu \2/" $$DESKTOPFILE; elif [ -x usr/bin/gnomesu ]; then sed -i.bak -re "s/(Exec=)(\/usr\/sbin\/gslapt)/\1gnomesu \2/" $$DESKTOPFILE; elif [ -x usr/bin/kdesu ]; then sed -i.bak -re "s/(Exec=)(\/usr\/sbin\/gslapt)/\1kdesu \2/" $$DESKTOPFILE; fi; fi' >> $(SLACKPKGBUILDDIR)/install/doinst.sh
strip --strip-unneeded $(SLACKPKGBUILDDIR)/$(sbindir)/@PACKAGE@
( cd $(SLACKPKGBUILDDIR) && /sbin/makepkg -l y -c n @PACKAGE@-@VERSION@-i386-1.tgz )