Commits

Anonymous committed 6e2c99a

Update pcmanfm to 1.1.0

Signed-off-by: Lee Pak Hong <benreilly@vector.Linux.net>

Comments (0)

Files changed (1)

var/vabs/pcmanfm/src/pcmanfm.SlackBuild

 # AUTHORS = 
 
 NAME="pcmanfm"            #Enter package Name!
-VERSION=${VERSION:-"0.9.9"}      #Enter package Version!
+VERSION=${VERSION:-"1.1.0"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"hata_ph"}   #Enter your Name!
-LINK=${LINK:-""}  #Enter URL for package here!
+LINK=${LINK:-"http://downloads.sourceforge.net/$NAME/$NAME-$VERSION.tar.gz"}  #Enter URL for package here!
 
 
 #SYSTEM VARIABLES
 LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
 ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
 EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+MAKEDEPENDS=${MAKEDEPENDS:-"libfm lxmenu-data"} #Add deps needed TO BUILD this package here.
 #----------------------------------------------------------------------------
 
+# DO NOT EXECUTE if NORUN is set to 1
+if [ "$NORUN" != "1" ]; then
+
 
 #SETUP PACKAGING ENVIRONMENT
 #--------------------------------------------
 #-----------------------------------------------------
 
 # if you want disable root use warning
-if [ "$BEND_ME_OVER" = "kthxbai" ]; then
-  patch -p1 < $CWD/patches/norootwarning.patch
-fi
+#if [ "$BEND_ME_OVER" = "kthxbai" ]; then
+#  patch -p1 < $CWD/patches/norootwarning.patch
+#fi
 
 # http://pcmanfm.git.sourceforge.net/git/gitweb.cgi?p=pcmanfm/pcmanfm;a=commitdiff;h=7a98615b1d7a408b03a0ceb6d365d60f50d4e717
-sed -i "s/on_tab_page_chdir(/void on_tab_page_chdir(/" src/main-win.c
+#sed -i "s/on_tab_page_chdir(/void on_tab_page_chdir(/" src/main-win.c
 
 #SET PERMISSIONS
 #-----------------------------------------
 #######################################################################
 
 # A minor polish
-sed -i 's/Name=File\ Manager/Name=PCMan\ File\ Manager/' $PKG/usr/share/applications/pcmanfm.desktop
+#sed -i 's/Name=File\ Manager/Name=PCMan\ File\ Manager/' $PKG/usr/share/applications/pcmanfm.desktop
 
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a ANNOUNCE* AUTHORS* BUGS* COPYING* ChangeLog* CHANGELOG* Credits* DEVELOPERS \
-LICENSE* MANIFEST PROVENANCE README* TODO* Exception_to_GPL_for_Qt.txt \
+cp -a AUTHORS* COPYING* ChangeLog* INSTALL NEWS README* TODO* \
 $PKG/usr/doc/$NAME-$VERSION
 cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
 
 EOF
 fi
 
-mkdir -p $PKG/install
+# Add schemas install to the doinst.sh if schemas are found.
+if [ -d $PKG/etc/gconf/schemas ];then
+# Make sure we have gconftool installed
+echo "if [ -x usr/bin/gconftool-2 ]; then" >> $PKG/install/doinst.sh
+( cd $PKG/etc/gconf/schemas
+for schema in *.schemas; do
+ # Install schemas
+ echo "GCONF_CONFIG_SOURCE=\"xml::etc/gconf/gconf.xml.defaults\" \
+   usr/bin/gconftool-2 --makefile-install-rule \
+   etc/gconf/schemas/${schema} >/dev/null 2>&1" \
+   >> $PKG/install/doinst.sh
+done;
+)
+# Finish off gconf block
+echo "fi" >> $PKG/install/doinst.sh
+fi
+
 cat >> $PKG/install/doinst.sh << EOF
-if [ -x /usr/bin/update-desktop-database ]; then
-  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+# update rarian database
+if [ -x usr/bin/rarian-sk-update ]; then
+  usr/bin/rarian-sk-update 1> /dev/null 2> /dev/null
+fi
+
+# update mime database
+if [ -x usr/bin/update-mime-database ]; then
+  usr/bin/update-mime-database usr/share/mime 1> /dev/null 2> /dev/null
+fi
+
+# update desktop entries
+if [ -x usr/bin/update-desktop-database ]; then
+  usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
+fi
+
+# update hicolor icons
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+	rm -f usr/share/icons/hicolor/icon-theme.cache
+fi
+usr/bin/gtk-update-icon-cache -f -q usr/share/icons/hicolor 1>/dev/null 2>/dev/null
+
+if [ -x /usr/bin/glib-compile-schemas ]; then
+  /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas/ >/dev/null 2>&1
+fi
+
+# Restart gconfd-2 if running to reload new gconf settings
+if ps acx | grep -q gconfd-2 ; then
+        killall -HUP gconfd-2 ;
 fi
 
-if [ -x /usr/bin/update-mime-database ]; then
-  /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+# A good idea whenever kernel modules are added or changed:
+if [ -x sbin/depmod ]; then
+  /sbin/depmod -a 1> /dev/null 2> /dev/null
 fi
 EOF
 
 cd $CWD
 echo "Cleaning up temp files..." && rm -rf $TMP
 echo "Package Complete"
+fi
 #--------------------------------------------------------------
 
 # vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##