openbsd-ports/devel/bouml/patches/patch-Makefile
2009-09-01 09:35:28 +00:00

87 lines
4.9 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.2 2009/09/01 09:35:28 jasper Exp $
Use INSTALL_DATA/INSTALL_PROGRAM here to make sure we end up with the correct
permissions being set (cp -p).
--- Makefile.orig Wed Jun 10 22:25:38 2009
+++ Makefile Tue Sep 1 09:57:54 2009
@@ -1,19 +1,19 @@
# The directory where all the bouml files will be installed, you
# can change it for instance because you don't have root permission
-BOUML_LIB = /usr/lib/bouml
+BOUML_LIB = ${PREFIX}/share/bouml
# The directory where the bouml shell script will be installed, you
# can change it for instance because you don't have root permission
-BOUML_DIR = /usr/bin
+BOUML_DIR = ${PREFIX}/bin
# The directory containing bouml.desktop
# The copy is not done if you comment the definition
-BOUML_DESKTOP_DIR = /usr/share/applications
+BOUML_DESKTOP_DIR = ${PREFIX}/share/applications
# The directories containing the bouml icons are
# <BOUML_ICONS_PREFIX_DIR>/<size>x<size>/apps
# The copy is not done if you comment the definition
-BOUML_ICONS_PREFIX_DIR = /usr/share/icons/hicolor
+BOUML_ICONS_PREFIX_DIR = ${PREFIX}/share/icons/hicolor
# On several Unix systems, the icons used inside the
# menus must be stored inside the pixmaps' directory.
@@ -26,7 +26,7 @@ BOUML_ICONS_PREFIX_DIR = /usr/share/icons/hicolor
# uncomment if needed
# MAKE = make
-QMAKE=qmake
+QMAKE?=qmake
SRC_DIRS = src \
src/CppGenerator \
@@ -109,9 +109,9 @@ install:
then \
for i in 16 32 48 64; do \
mkdir -p "$(DESTDIR)$(BOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps"; \
- cp -p bouml.$$i.png "$(DESTDIR)$(BOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/bouml.png"; \
- cp -p projectControl.$$i.png "$(DESTDIR)$(BOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/projectControl.png"; \
- cp -p projectSynchro.$$i.png "$(DESTDIR)$(BOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/projectSynchro.png"; \
+ ${BSD_INSTALL_DATA} bouml.$$i.png "$(DESTDIR)$(BOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/bouml.png"; \
+ ${BSD_INSTALL_DATA} projectControl.$$i.png "$(DESTDIR)$(BOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/projectControl.png"; \
+ ${BSD_INSTALL_DATA} projectSynchro.$$i.png "$(DESTDIR)$(BOUML_ICONS_PREFIX_DIR)/$$i"x"$$i/apps/projectSynchro.png"; \
done; \
fi
if test -n "$(BOUML_UNIX_PIXMAPS_DIR)"; then \
@@ -120,13 +120,8 @@ install:
cp -f projectControl.48.png "$(DESTDIR)$(BOUML_UNIX_PIXMAPS_DIR)/projectControl.png"; \
cp -f projectSynchro.48.png "$(DESTDIR)$(BOUML_UNIX_PIXMAPS_DIR)/projectSynchro.png"; \
fi
- for i in $(PROGS); do cp -p $$i "$(DESTDIR)$(BOUML_LIB)" ; done
+ for i in $(PROGS); do ${BSD_INSTALL_PROGRAM} $$i "$(DESTDIR)$(BOUML_DIR)" ; done
cd plugouts ; tar cf - empty genpro html rose singleton cpp_utilities xmi xmi2 xmi2import sm_generator usecase_wizard sort uml_projection FileControl deploy GlobalChange | (cd $(DESTDIR)$(BOUML_LIB); tar xf -)
- echo "#!/bin/sh" >$(DESTDIR)$(BOUML_DIR)/bouml
- echo "PATH=$(BOUML_LIB):$$"PATH >>$(DESTDIR)$(BOUML_DIR)/bouml
- echo "export PATH" >>$(DESTDIR)$(BOUML_DIR)/bouml
- echo "exec $(BOUML_LIB)/bouml \"$$"@"\"" >>$(DESTDIR)$(BOUML_DIR)/bouml
- chmod +x "$(DESTDIR)$(BOUML_DIR)/bouml"
cd $(DESTDIR)$(BOUML_DIR) ; rm -f projectControl ; ln -s $(BOUML_LIB)/projectControl
cd $(DESTDIR)$(BOUML_DIR) ; rm -f projectSynchro ; ln -s $(BOUML_LIB)/projectSynchro
if test -n "$(BOUML_DESKTOP_DIR)" ; \
@@ -146,7 +141,7 @@ install:
echo "Name=Project Control" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
echo "Type=Application" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
echo "Comment=Bouml project's files control" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
- echo "Exec=$(BOUML_LIB)/projectControl" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
+ echo "Exec=$(BOUML_DIR)/projectControl" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
echo "TryExec=projectControl" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
echo "Icon=projectControl" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
echo "Categories=Development;" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectControl.desktop" ; \
@@ -155,7 +150,7 @@ install:
echo "Name=Project Synchro" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \
echo "Type=Application" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \
echo "Comment=Bouml project's files synchronization" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \
- echo "Exec=$(BOUML_LIB)/projectSynchro" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \
+ echo "Exec=$(BOUML_DIR)/projectSynchro" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \
echo "TryExec=projectSynchro" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \
echo "Icon=projectSynchro" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \
echo "Categories=Development;" >> "$(DESTDIR)$(BOUML_DESKTOP_DIR)/projectSynchro.desktop" ; \