Permalink
Browse files

* install-freedesktop Makefile target

  • Loading branch information...
1 parent e62aae7 commit 8d8e8aa8d8546c942f4b7a35af0732b43c51f0d1 @eserte committed Mar 21, 2013
Showing with 29 additions and 4 deletions.
  1. +17 −0 Makefile.PL
  2. +11 −0 kde/bbbike.desktop.tst
  3. +1 −4 port/debian/rules
View
@@ -616,7 +616,24 @@ install-using-eui: distdir do--install-using-eui do--symlink-bbbikeexe
do--install-using-eui:
-rm -rf ${BBBIKE_DEST_DIR}
+ [ -d ${BBBIKE_DEST_DIR} ] || mkdir -p ${BBBIKE_DEST_DIR}
$(PERL) -MExtUtils::Install -e 'install({ "$(DISTVNAME)" => "$(BBBIKE_DEST_DIR)" }, $(VERBINST), 0, 0, ["/debian/.*"], 1)'
+
+install-freedesktop:
+ [ -d ${INSTALL_PREFIX}/share/applications ] || mkdir -p ${INSTALL_PREFIX}/share/applications
+ for size in 128x128 72x72 64x64 48x48 32x32 16x16 scalable; do \
+ [ -d ${INSTALL_PREFIX}/share/icons/hicolor/$$size/apps ] || mkdir -p ${INSTALL_PREFIX}/share/icons/hicolor/$$size/apps; \
+ done
+ perl -Ilib -MText::ScriptTemplate -e '$$t=Text::ScriptTemplate->new; $$t->setq(BBBIKE_ROOTDIR => "$(REAL_BBBIKE_DEST_DIR)"); print $$t->load("kde/bbbike.desktop.tst")->fill' > ${INSTALL_PREFIX}/share/applications/bbbike.desktop~
+ mv ${INSTALL_PREFIX}/share/applications/bbbike.desktop~ ${INSTALL_PREFIX}/share/applications/bbbike.desktop
+ install -m644 images/srtbike114.png ${INSTALL_PREFIX}/share/icons/hicolor/128x128/apps/bbbike.png
+ install -m644 images/srtbike72.png ${INSTALL_PREFIX}/share/icons/hicolor/72x72/apps/bbbike.png
+ install -m644 images/srtbike57.png ${INSTALL_PREFIX}/share/icons/hicolor/64x64/apps/bbbike.png
+ install -m644 images/srtbike48a.png ${INSTALL_PREFIX}/share/icons/hicolor/48x48/apps/bbbike.png
+ install -m644 images/srtbike32.xpm ${INSTALL_PREFIX}/share/icons/hicolor/32x32/apps/bbbike.xpm
+ install -m644 images/srtbike16.xpm ${INSTALL_PREFIX}/share/icons/hicolor/16x16/apps/bbbike.xpm
+ install -m644 images/srtbike_logo.svg ${INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/bbbike.svg
+
EOF
return $out;
View
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=BBBike
+Comment=Search routes for cyclists in Berlin and Brandenburg
+Comment[de]=Routenplaner für Radfahrer in Berlin und Brandenburg
+Encoding=UTF-8
+Exec=perl <%= $BBBIKE_ROOTDIR %>/bbbike %f
+Icon=bbbike
+MimeType=application/x-bbbike-route;application/x-gpstrack;application/x-bbbike-data;
+Terminal=false
+StartupNotify=true
+Type=Application
View
@@ -11,9 +11,6 @@ override_dh_auto_configure:
perl Makefile.PL
override_dh_auto_install:
- mkdir $$(pwd)/debian/bbbike/usr
- mkdir $$(pwd)/debian/bbbike/usr/lib
- mkdir $$(pwd)/debian/bbbike/usr/lib/BBBike
- make install-using-eui BBBIKE_DEST_DIR=$$(pwd)/debian/bbbike/usr/lib/BBBike INSTALL_PREFIX=$$(pwd)/debian/bbbike/usr
+ make install-using-eui install-freedesktop BBBIKE_DEST_DIR=$$(pwd)/debian/bbbike/usr/lib/BBBike REAL_BBBIKE_DEST_DIR=/usr/lib/BBBike INSTALL_PREFIX=$$(pwd)/debian/bbbike/usr
override_dh_auto_test:

0 comments on commit 8d8e8aa

Please sign in to comment.