Commits

Rodrigo Bistolfi  committed 8147135

Merged changes from uelsk8s, added patches handling and gconf schemas, fixed
cflags

  • Participants
  • Parent commits b2f94e7

Comments (0)

Files changed (5)

File templates/cflags

 if [[ "$ARCH" = i?86 ]]; then
   ARCH=i586
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
-  CONFIGURE_TRIPLET="i586-vector-linux"
+  CONFIGURE_TRIPLET="i486-slackware-linux"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fpic"
-  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
+  CONFIGURE_TRIPLET="x86_64-slackware-linux"
   LIBDIRSUFFIX="64"
 elif [ "$ARCH" = "powerpc" ]; then
   SLKCFLAGS="-O2"

File templates/configure.default

 
 make || exit 1
 
-make install PREFIX=$PKG DESTDIR=$PKG || exit
+make install DESTDIR=$PKG || exit 1

File templates/header

 #!/usr/bin/bash
 # This script assumes it will be launched within "/NAME/VERSION/src" dir.
-# With all sources in "src" Your Vector Linux .tlz package, slack-desc,
+# With all sources in "src" Your Vector Linux .txz package, slack-desc,
 # and slack-required will be found in "VERSION" dir. The extraction and
 # build will be in a temp dir created in "NAME" dir, and then removed on exit.
 # Comment out second to last line to keep this dir intact.

File templates/pkgsetup

 
 
 rm -rf $PKG
-mkdir -p $PKG
 cd $TMP
 rm -rf $NAME-$VERSION
 
 
 cd $TMP/$NAME-$VERSION
 
-# Put any Patches here
+#PATCHES
+#-----------------------------------------------------
+# Put any Patches here *NOTE this only works if all 
+# your patches use the -p1 strip option!
 #-----------------------------------------------------
 #patch -p1 <
+for i in $CWD/patches/*;do
+  patch -p1 <$i || exit 1
+  mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
+  cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
+done
 #-----------------------------------------------------
-
+ 
+ 
 
 #SET PERMISSIONS
 #-----------------------------------------

File templates/tweaks

 mkdir -p $PKG/install
 if [ -d $PKG/usr/info ] ; then
 cat >> $PKG/install/doinst.sh << EOF
+CWD=\$(pwd)
 cd usr/info
 if [ -f dir ]; then
     rm dir
 if [ -f dir.gz ]; then
     rm dir.gz
 fi
-for i in *.info.gz
-        do
-        install-info $i dir
-    done
+for i in *.info.gz;do
+    install-info \$i dir
+done
+cd \$CWD
 EOF
 fi
 
-mkdir -p $PKG/install
+# Add schemas install to the doinst.sh if schemas are found.
+if [ -d $PKG/etc/gconf/schemas ] && {
+# 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
+}