[PC-BSD Commits] r3364 - pbibuild/pbi-source/PBCsource

svn at pcbsd.org svn at pcbsd.org
Thu Jan 29 11:31:23 PST 2009


Author: kris
Date: 2009-01-29 11:31:23 -0800 (Thu, 29 Jan 2009)
New Revision: 3364

Modified:
   pbibuild/pbi-source/PBCsource/addpbimime.sh
   pbibuild/pbi-source/PBCsource/main.cpp
   pbibuild/pbi-source/PBCsource/pbcwizard.ui
Log:

Updated PBC, to reflect version 5 now



Modified: pbibuild/pbi-source/PBCsource/addpbimime.sh
===================================================================
--- pbibuild/pbi-source/PBCsource/addpbimime.sh	2009-01-29 19:02:44 UTC (rev 3363)
+++ pbibuild/pbi-source/PBCsource/addpbimime.sh	2009-01-29 19:31:23 UTC (rev 3364)
@@ -7,8 +7,16 @@
 TERMINAL="${5}"
 PROGDIRNAME="${6}"
 
+# Check if we have a different pcbsdbase conf
+if [ -e "/PCBSD/conf/pcbsdbase" ]
+then
+   BASE="`cat /PCBSD/conf/pcbsdbase`"
+else
+   BASE="/usr/local"
+fi
+
 # First update the mime database to ensure we have an updated globs file
-update-mime-database /usr/local/share/mime >/dev/null 2>/dev/null
+update-mime-database ${BASE}/share/mime >/dev/null 2>/dev/null
 
 i=1
 while
@@ -46,8 +54,8 @@
   then
      break
   else
-      # First parse /usr/local/share/mime/globs to see if we have this ext
-      grep "${EXTENSIONS[${i}]}" /usr/local/share/mime/globs >/dev/null 2>/dev/null
+      # First parse ${BASE}/share/mime/globs to see if we have this ext
+      grep "${EXTENSIONS[${i}]}" ${BASE}/share/mime/globs >/dev/null 2>/dev/null
       if [ "$?" = "0" ]
       then
          # This ext is in the globs file, save it as such
@@ -85,7 +93,7 @@
     #echo "EXTIN: ${EXTGLOB[${i}]}"  
 
     # Lets get the mime entry in the glob for this extension
-    MIMESTRING=`grep "${EXTGLOB[${i}]}" /usr/local/share/mime/globs | cut -d ':' -f 1`
+    MIMESTRING=`grep "${EXTGLOB[${i}]}" ${BASE}/share/mime/globs | cut -d ':' -f 1`
   
 
     # Now lets create the .desktop file for this type
@@ -94,21 +102,21 @@
 Icon=${ICON}
 InitialPreference=1
 MimeType=${MIMESTRING}
-Name=${PROGNAME}" > "/usr/local/share/applnk/.hidden/${PROGNAME}-${i}a.desktop"
+Name=${PROGNAME}" > "${BASE}/share/applnk/.hidden/${PROGNAME}-${i}a.desktop"
 
     if [ "$TERMINAL" = "1" ]
     then
-      echo "Terminal=true" >>"/usr/local/share/applnk/.hidden/${PROGNAME}-${i}a.desktop"
+      echo "Terminal=true" >>"${BASE}/share/applnk/.hidden/${PROGNAME}-${i}a.desktop"
     fi
 
     # Check if we have a mimeapps.list file and append to it now
-    if [ ! -e "/usr/local/share/applications/mimeapps.list" ]
+    if [ ! -e "${BASE}/share/applications/mimeapps.list" ]
     then
-       echo "[Added Associations]" > /usr/local/share/applications/mimeapps.list
+       echo "[Added Associations]" > ${BASE}/share/applications/mimeapps.list
     fi
 
     # Now add our entry for this mime type
-    echo "${MIMESTRING}=${PROGNAME}-${i}a.desktop" >> /usr/local/share/applications/mimeapps.list
+    echo "${MIMESTRING}=${PROGNAME}-${i}a.desktop" >> ${BASE}/share/applications/mimeapps.list
 
     i="`expr ${i} + 1`"
   done
@@ -140,7 +148,7 @@
          <glob pattern=\"${EXTNOGLOB[${i}]}\"/>
          <desktop>${PROGNAME}-${i}b.desktop</desktop>
   </mime-type>
-</mime-info>" >"/usr/local/share/mime/packages/${PROGNAME}-${i}b.xml"
+</mime-info>" >"${BASE}/share/mime/packages/${PROGNAME}-${i}b.xml"
     
 
     # Create the .hidden/ desktop file
@@ -149,29 +157,29 @@
 Icon=${ICON}
 InitialPreference=1
 MimeType=${MIMESTRING}
-Name=${PROGNAME}" >"/usr/local/share/applnk/.hidden/${PROGNAME}-${i}b.desktop"
+Name=${PROGNAME}" >"${BASE}/share/applnk/.hidden/${PROGNAME}-${i}b.desktop"
 
 
 # Lets create the icon mimetypes links so that KDE can load them now
 ICONNAME="`echo ${MIMESTRING} | tr "/" "-"`.png"
-if [ ! -e "/usr/local/kde4/share/icons/oxygen/16x16/mimetypes/${ICONNAME}" ]
+if [ ! -e "${BASE}/kde4/share/icons/oxygen/16x16/mimetypes/${ICONNAME}" ]
 then
-  ln -s ${ICON} /usr/local/kde4/share/icons/oxygen/16x16/mimetypes/${ICONNAME}
+  ln -s ${ICON} ${BASE}/kde4/share/icons/oxygen/16x16/mimetypes/${ICONNAME}
 fi
 
-if [ ! -e "/usr/local/kde4/share/icons/oxygen/48x48/mimetypes/${ICONNAME}" ]
+if [ ! -e "${BASE}/kde4/share/icons/oxygen/48x48/mimetypes/${ICONNAME}" ]
 then
-  ln -s ${ICON} /usr/local/kde4/share/icons/oxygen/48x48/mimetypes/${ICONNAME}
+  ln -s ${ICON} ${BASE}/kde4/share/icons/oxygen/48x48/mimetypes/${ICONNAME}
 fi
 
-if [ ! -e "/usr/local/kde4/share/icons/oxygen/64x64/mimetypes/${ICONNAME}" ]
+if [ ! -e "${BASE}/kde4/share/icons/oxygen/64x64/mimetypes/${ICONNAME}" ]
 then
-  ln -s ${ICON} /usr/local/kde4/share/icons/oxygen/64x64/mimetypes/${ICONNAME}
+  ln -s ${ICON} ${BASE}/kde4/share/icons/oxygen/64x64/mimetypes/${ICONNAME}
 fi
 
-if [ ! -e "/usr/local/kde4/share/icons/oxygen/128x128/mimetypes/${ICONNAME}" ]
+if [ ! -e "${BASE}/kde4/share/icons/oxygen/128x128/mimetypes/${ICONNAME}" ]
 then
-  ln -s ${ICON} /usr/local/kde4/share/icons/oxygen/128x128/mimetypes/${ICONNAME}
+  ln -s ${ICON} ${BASE}/kde4/share/icons/oxygen/128x128/mimetypes/${ICONNAME}
 fi
 
 # Save the icon name for program removal
@@ -179,7 +187,7 @@
 
     if [ "$TERMINAL" = "1" ]
     then
-      echo "Terminal=true" >>"/usr/local/share/applnk/.hidden/${PROGNAME}-${i}b.desktop"
+      echo "Terminal=true" >>"${BASE}/share/applnk/.hidden/${PROGNAME}-${i}b.desktop"
     fi
 
     i="`expr ${i} + 1`"
@@ -189,4 +197,4 @@
 
 
 # Finish up by updating the mime database again
-update-mime-database /usr/local/share/mime >/dev/null 2>/dev/null
+update-mime-database ${BASE}/share/mime >/dev/null 2>/dev/null

Modified: pbibuild/pbi-source/PBCsource/main.cpp
===================================================================
--- pbibuild/pbi-source/PBCsource/main.cpp	2009-01-29 19:02:44 UTC (rev 3363)
+++ pbibuild/pbi-source/PBCsource/main.cpp	2009-01-29 19:31:23 UTC (rev 3364)
@@ -16,7 +16,7 @@
 int main( int argc, char ** argv )
 {
     KAboutData aboutData("PBC", 0, ki18n("PBC"),
-                            "4.4", ki18n(description),
+                            "5.0", ki18n(description),
                             KAboutData::License_BSD,
                             ki18n("(c) 2008, Kris Moore(c)"));
 
@@ -67,6 +67,6 @@
 void show_args(void)
 {
     
-    printf("PBI Creator 3.0\n\nUsage:\n ./PBC or ./PBC <pbc file>\n\nCommand Line Options:\n --create <pbc file>\t Creates a PBI from the .pbc file specified\n");
+    printf("PBI Creator 5.0\n\nUsage:\n ./PBC or ./PBC <pbc file>\n\nCommand Line Options:\n --create <pbc file>\t Creates a PBI from the .pbc file specified\n");
     
 }

Modified: pbibuild/pbi-source/PBCsource/pbcwizard.ui
===================================================================
--- pbibuild/pbi-source/PBCsource/pbcwizard.ui	2009-01-29 19:02:44 UTC (rev 3363)
+++ pbibuild/pbi-source/PBCsource/pbcwizard.ui	2009-01-29 19:31:23 UTC (rev 3364)
@@ -231,7 +231,7 @@
     <item row="14" column="0" >
      <widget class="QLabel" name="textLabel1_5" >
       <property name="text" >
-       <string>PBI Creator 4</string>
+       <string>PBI Creator 5</string>
       </property>
       <property name="wordWrap" >
        <bool>false</bool>



More information about the Commits mailing list