1 diff -Naur gip-1.7.0-1.old/build.sh gip-1.7.0-1/build.sh
2 --- gip-1.7.0-1.old/build.sh 2009-01-07 15:51:38.000000000 -0600
3 +++ gip-1.7.0-1/build.sh 2009-01-07 15:51:42.000000000 -0600
5 # Installation paths. (Plugins will be installed in the LIBDIR)
6 INST_IN_LIBDIR=`find . -name "*.glade"`
7 INST_IN_PIXMAPDIR=`find src/ -name "*.png"`
9 +INST_IN_DOCDIR='ChangeLog'
10 INST_IN_GNOMEDOCDIR=`find doc/ -maxdepth 1 -name "*.xml" -o -path "doc/figures*"`
11 +INST_IN_APPDIR='gip.desktop'
13 ###############################################################################
19 -INST_BINDIR="$INST_PREFIX/bin/"
20 -INST_LIBDIR="$INST_PREFIX/lib/$EXECUTABLE"
21 +INST_BINDIR="$INST_PREFIX/bin"
22 +INST_LIBDIR="$INST_PREFIX/share/$EXECUTABLE/data"
23 INST_LOCALEDIR="$INST_PREFIX/share/locale"
24 -INST_PIXMAPDIR="$INST_PREFIX/lib/$EXECUTABLE"
25 -INST_DOCDIR="$INST_PREFIX/doc/$EXECUTABLE"
26 +INST_PIXMAPDIR="$INST_PREFIX/share/pixmaps/$EXECUTABLE"
27 +INST_DOCDIR="$INST_PREFIX/share/doc/$EXECUTABLE"
28 INST_GNOMEDOCDIR="$INST_PREFIX/share/gnome/help/$EXECUTABLE/C"
29 INST_MIME_XML="$INST_PREFIX/share/mime/packages/"
30 INST_MIME_KEY="$INST_PREFIX/share/mime-info/"
32 echo "# Installation in $INST_PREFIX";
33 echo "####################################################################";
34 if [ ! -d "$INST_PREFIX" ]; then
35 - echo "Installation prefix directory $INST_PREFIX does not exist!" >&2
36 - echo "Use \"--prefix prefix\" to specify an existing directory." >&2
37 - echo "Installation aborted." >&2
39 + make_installdirs.sh "$INST_PREFIX" || exit 1
42 echo Creating directories...
44 make_installdirs.sh $CREATEDIRS || exit 1
46 echo Installing $EXECUTABLE...
47 -cp $EXECUTABLE $INST_BINDIR || exit 1
48 +install -Dm755 $EXECUTABLE $INST_BINDIR || exit 1
50 echo Installing libraries in $INST_LIBDIR...
51 if [ "$INST_IN_LIBDIR" != "" ]; then
52 - cp $INST_IN_LIBDIR $INST_LIBDIR || exit 1
53 + install -Dm644 $INST_IN_LIBDIR $INST_LIBDIR || exit 1
56 echo Installing pixmaps in $INST_PIXMAPDIR...
57 if [ "$INST_IN_PIXMAPDIR" != "" ]; then
58 - cp $INST_IN_PIXMAPDIR $INST_PIXMAPDIR || exit 1
59 + install -Dm644 $INST_IN_PIXMAPDIR $INST_PIXMAPDIR || exit 1
60 + ln -sf gip/calculator.png $INST_PIXMAPDIR/../gip.png || exit 1
63 echo Installing documentation in $INST_DOCDIR...
64 if [ "$INST_IN_DOCDIR" != "" ]; then
65 - cp $INST_IN_DOCDIR $INST_DOCDIR || exit 1
66 + install -Dm644 $INST_IN_DOCDIR $INST_DOCDIR || exit 1
69 echo Installing GNOME documentation in $INST_GNOMEDOCDIR...
70 if [ -d "$INST_GNOMEDOCDIR" -a -w "$INST_GNOMEDOCDIR" ]; then
71 - cp -r "$INST_IN_GNOMEDOCDIR" "$INST_GNOMEDOCDIR"
72 + if [ -n "$INST_IN_GNOMEDOCDIR" ]; then
73 + cp -r "$INST_IN_GNOMEDOCDIR" "$INST_GNOMEDOCDIR"
74 + find "$INST_GNOMEDOCDIR" -type d -exec chmod 755 '{}' \;
75 + find "$INST_GNOMEDOCDIR" -type f -exec chmod 644 '{}' \;
78 echo "WARNING: GNOME documentation directory not found or it is not" >&2
79 echo " writeable! Skipping GNOME documentation installation." >&2
83 echo Installing application icons...
84 -cp src/pixmaps/calc32.png $INST_ICON/32x32/apps/calc.png
85 -cp src/pixmaps/calc48.png $INST_ICON/48x48/apps/calc.png
86 +install -Dm644 src/pixmaps/calc32.png $INST_ICON/32x32/apps/calc.png
87 +install -Dm644 src/pixmaps/calc48.png $INST_ICON/48x48/apps/calc.png
89 echo Creating menu entry and registering MIME extension...
90 -cp $EXECUTABLE.desktop $INST_MENU_XDG || exit 1
91 -cp $EXECUTABLE.xml $INST_MIME_XML || exit 1
92 +install -Dm644 $EXECUTABLE.desktop $INST_MENU_XDG || exit 1
93 +install -Dm644 $EXECUTABLE.xml $INST_MIME_XML || exit 1
96 echo $PROGRAMNAME has been installed successfully!
97 diff -Naur gip-1.7.0-1.old/gip.desktop.in gip-1.7.0-1/gip.desktop.in
98 --- gip-1.7.0-1.old/gip.desktop.in 2009-01-07 15:51:38.000000000 -0600
99 +++ gip-1.7.0-1/gip.desktop.in 2009-01-07 15:51:51.000000000 -0600
103 -Name=%APP_NAME% IP Address Calculator
104 -Name[de]=%APP_NAME% IP-Adress-Rechner
105 -GenericName=IP Adress Calculator
109 +GenericName=IP Address Calculator
110 GenericName[de]=IP-Adress-Rechner
111 Comment=Calculate IP addresses and networks
112 Comment[de]=IP-Adressen und Netzbereiche berechnen
113 -Exec=%INSTALL_BIN%%APP_SYSNAME% %U
114 +Exec=%APP_SYSNAME% %U
117 -Icon=%INSTALL_LIB%/calculator.png
120 -Categories=GNOME;GTK;Utility;
121 +Categories=GNOME;GTK;Network;
122 MimeType=application/x-%APP_SYSNAME%;
123 diff -Naur gip-1.7.0-1.old/installer/install_locales.sh gip-1.7.0-1/installer/install_locales.sh
124 --- gip-1.7.0-1.old/installer/install_locales.sh 2009-01-07 15:51:38.000000000 -0600
125 +++ gip-1.7.0-1/installer/install_locales.sh 2009-01-07 15:51:42.000000000 -0600
128 for FILE in $LOCALEFILES; do
129 LOCALE=`echo $FILE | sed 's/.*\///; s/\.mo//'`
130 - mkdir -p $POTDIR/$LOCALE/LC_MESSAGES/
131 - cp $FILE $POTDIR/$LOCALE/LC_MESSAGES/$DOMAIN.mo || return 1
132 + install -dm755 $POTDIR/$LOCALE/LC_MESSAGES/
133 + install -Dm644 $FILE $POTDIR/$LOCALE/LC_MESSAGES/$DOMAIN.mo || return 1
137 diff -Naur gip-1.7.0-1.old/installer/make_installdirs.sh gip-1.7.0-1/installer/make_installdirs.sh
138 --- gip-1.7.0-1.old/installer/make_installdirs.sh 2009-01-07 15:51:38.000000000 -0600
139 +++ gip-1.7.0-1/installer/make_installdirs.sh 2009-01-07 15:51:42.000000000 -0600
142 if [ ! -e "$DIR" ]; then
143 echo "Creating directory $DIR... "
145 + install -dm755 $DIR
146 if [ "$?" -ne "0" ]; then
147 echo "Failed to create $DIR."