1. VectorLinux Core
  2. vabs

Commits

Lee Pak Hong  committed 636591f

Rebuild pycups

Signed-off-by: Lee Pak Hong <hata.ph@gmail.com>

  • Participants
  • Parent commits c68eff6
  • Branches veclinux-7.0

Comments (0)

Files changed (1)

File var/vabs/pycups/src/pycups.SlackBuild

View file
 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:-"cups"} #Add deps needed TO BUILD this package here.
 #----------------------------------------------------------------------------
 
+# DO NOT EXECUTE if NORUN is set to 1
+if [ "$NORUN" != "1" ]; then
+
 
 #SETUP PACKAGING ENVIRONMENT
 #--------------------------------------------
 # Put any Patches here *NOTE this only works if all 
 # your patches use the -p1 strip option!
 #-----------------------------------------------------
-for i in $CWD/patches/*;do
-  patch -p1 <$i
-  mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
-  cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
-done
+#for i in $CWD/patches/*;do
+#  patch -p1 <$i
+#  mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
+#  cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
+#done
 #-----------------------------------------------------
  
  
 
 echo "Configuring source..."
 
-python setup.py build
-python setup.py install --root=$PKG --optimize=1
-
+#python setup.py build
+#python setup.py install --root=$PKG --optimize=1
 
+make || exit 1
+make install DESTDIR=$PKG || exit 1
 
 #######################################################################
 #Miscellenious tweaks and things outside a normal ./configure go here #
 
 
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
-$PKG/usr/doc/$NAME-$VERSION
+cp -a COPYING ChangeLog NEWS README TODO $PKG/usr/doc/$NAME-$VERSION
 cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
 
 #----------------------------------------------------------------------
 echo "fi" >> $PKG/install/doinst.sh
 fi
 
+cat >> $PKG/install/doinst.sh << EOF
+# 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 usr/share/applications 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
+
+# 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
 
 #if there is a slack-desc in src dir use it
 if test -f $CWD/slack-desc; then
 # customary to leave one space after the ':'.
 
 $SHIM|-----handy-ruler------------------------------------------------------|
-$NAME: $NAME (python bindings for the cups printer software)
+$NAME: $NAME (Python bindings for the CUPS API)
 $NAME:
-$NAME: 
+$NAME: These Python bindings are intended to wrap the CUPS API.
 $NAME: 
 $NAME: 
 $NAME: 
 $NAME:
 $NAME:
 $NAME: License: GPL
-$NAME: Authors: 
-$NAME: Website: 
+$NAME: Authors: http://cyberelk.net/tim/software/pycups/
+$NAME: Website: http://cyberelk.net/tim/software/pycups/
 
 EOF
 fi
 cd $CWD
 echo "Cleaning up temp files..." && rm -rf $TMP
 echo "Package Complete"
+fi
 #--------------------------------------------------------------
 
 # vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##