Skip to content

Commit

Permalink
Fix: Debian package
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 9, 2011
1 parent 769ae71 commit 9f8d5f7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
23 changes: 13 additions & 10 deletions build/deb/postinst
Expand Up @@ -120,18 +120,21 @@ case "$1" in
done

# Copy icon file
echo "Copy icon file"
fileorig="/usr/share/dolibarr/doc/images/dolibarr.xpm"
target="/usr/share/pixmaps/"
cp -f $fileorig $target
#echo "Copy icon file"
#fileorig="/usr/share/dolibarr/doc/images/dolibarr.xpm"
#target="/usr/share/pixmaps/"
#cp -f $fileorig $target

echo "Install menu entry"
#echo "Install menu entry"
# This one is for Gnome ubuntu
fileorig="/usr/share/dolibarr/build/deb/dolibarr.desktop"
target="/usr/share/applications/"
cp -f $fileorig $target
# Not sure this one is usefull
if test -x /usr/bin/update-menus; then update-menus; fi
#fileorig="/usr/share/dolibarr/build/deb/dolibarr.desktop"
#target="/usr/share/applications/"
#cp -f $fileorig $target
# Not sure this is usefull
if test -x /usr/bin/update-menus; then
echo "update-menus"
update-menus;
fi

# TODO Create the file to force parameters in Web installer
#if grep DBHOST /usr/share/dolibarr/htdocs/conf/conf.php > /dev/null
Expand Down
10 changes: 5 additions & 5 deletions build/deb/postrm
Expand Up @@ -221,11 +221,11 @@ case "$1" in
echo "postrm Force remove of /usr/share/dolibarr/htdocs/install"
rm -fr /usr/share/dolibarr/htdocs/install

echo "postrm Remove menu entry and image"
fileorig="/usr/share/applications/dolibarr.desktop"
rm -f $fileorig
fileorig="/usr/share/pixmaps/dolibarr.xpm"
rm -f $fileorig
#echo "postrm Remove menu entry and image"
#fileorig="/usr/share/applications/dolibarr.desktop"
#rm -f $fileorig
#fileorig="/usr/share/pixmaps/dolibarr.xpm"
#rm -f $fileorig
# Not sure this is usefull
if test -x /usr/bin/update-menus; then update-menus; fi
;;
Expand Down
14 changes: 12 additions & 2 deletions build/makepack-dolibarr.pl
Expand Up @@ -432,8 +432,15 @@
close SPECTO;
print "Version set to $MAJOR.$MINOR.$newbuild\n";

print "Create directory $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/$PROJECT/documents"`;
print "Create directory $BUILDROOT/$PROJECT/usr/share/applications\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/applications"`;
print "Copy desktop file into $BUILDROOT/$PROJECT/usr/share/applications/dolibarr.desktop\n";
$ret=`cp "$SOURCE/build/deb/dolibarr.desktop" "$BUILDROOT/$PROJECT/usr/share/applications/dolibarr.desktop"`;

print "Create directory $BUILDROOT/$PROJECT/usr/share/pixmaps\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/pixmaps"`;
print "Copy pixmap file into $BUILDROOT/$PROJECT/usr/share/pixmaps/dolibarr.xpm\n";
$ret=`cp "$SOURCE/doc/images/dolibarr.xpm" "$BUILDROOT/$PROJECT/usr/share/pixmaps/dolibarr.xpm"`;

#print "Create directory $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`mkdir -p "$BUILDROOT/$PROJECT/etc/$PROJECT"`;
Expand All @@ -450,6 +457,9 @@
#print "Copy apache conf file into $BUILDROOT/$PROJECT/etc/$PROJECT\n";
#$ret=`cp "$SOURCE/build/deb/apache.conf" "$BUILDROOT/$PROJECT/etc/$PROJECT"`;

print "Create directory $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents\n";
$ret=`mkdir -p "$BUILDROOT/$PROJECT/usr/share/$PROJECT/documents"`;

print "Set permissions/owners on files/dir\n";
$ret=`chown -R root.root $BUILDROOT/$PROJECT`;
$ret=`chown -R www-data.www-data $BUILDROOT/$PROJECT/usr/share/$PROJECT/documents`;
Expand Down

0 comments on commit 9f8d5f7

Please sign in to comment.