]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/distrib/makerpm
added our own implementation of strto[u]ll() if the system doesn't have one (patch...
[wxWidgets.git] / wxPython / distrib / makerpm
index 5a989b6db1e3bf2ea10443bafb57bb92b34dd50c..5acb514db4ce4bcf37018a676c8ef8aa76656550 100755 (executable)
@@ -3,6 +3,7 @@
 # Build an RPM containing both wxGTK and wxPython
 
 ##set -o xtrace
+##set -o errexit
 
 spectemplate=distrib/wxPythonFull.spec.in
 
@@ -28,6 +29,7 @@ lcport=gtk
 unicode=0
 tarname=wxPython-src
 srpmonly=0
+skipclean=0
 
 #----------------------------------------------------------------------
 # Check parameters
@@ -134,21 +136,17 @@ if [ -z "${skipcopy}" ]; then
     # copy root dir contents
     cp -pf --link ${wxdir}/* ${tarver} > /dev/null 2>&1
 
-    # copy all top dirs except CVS, build, demos, samples, utils, and wxPython
-    for d in art build contrib debian distrib docs include lib locale misc patches src; do
+    # copy all top dirs except CVS, demos, samples, and wxPython
+    for d in art build contrib debian docs include lib locale patches samples src utils; do
        if [ -e ${wxdir}/$d ]; then
            cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1
        fi
     done
+    mkdir ${tarver}/distrib
+    cp -Rpf --link ${wxdir}/distrib/scripts ${tarver}/distrib
 
-#     # and tex2rtf too
-#     mkdir ${tarver}/utils
-#     cp -Rpf --link ${wxdir}/utils/tex2rtf ${tarver}/utils
-#     # tex2rtf needs these files
-#     mkdir ${tarver}/samples
-#     cp -Rpf --link ${wxdir}/samples/sample.* ${tarver}/samples
 
-    # now do the same thing for wxPython, skipping it's build dirs and such
+    # now do the same thing for wxPython, but use the DIRLIST to select dirs to copy
     for dir in `grep -v '#' ${wxdir}/wxPython/distrib/DIRLIST`; do
        mkdir ${tarver}/${dir}
        ##echo "cp -pf --link ${wxdir}/${dir}/* ${tarver}/${dir}"
@@ -171,10 +169,10 @@ if [ -z "${skipcopy}" ]; then
     rm -f ChangeLog
     rm *.spec
     rm -rf distrib/msw/tmake
-    rm -rf docs/html
-    rm -rf docs/latex
-    rm -rf contrib/docs
-    rm -rf contrib/samples
+    #rm -rf docs/html
+    #rm -rf docs/latex
+    #rm -rf contrib/docs
+    #rm -rf contrib/samples
     rm locale/*.mo
     cleanup ".#*"
     cleanup "#*#"
@@ -184,13 +182,17 @@ if [ -z "${skipcopy}" ]; then
     cleanup "*.pyc"
     cleanup core
     cleanup "core.[0-9]*"
+    rm -f wxPython/samples/embedded/embedded
+    rm -f wxPython/samples/embedded/embedded.o
 
     # ports that are not supported yet
-    cleanup cocoa
+    #cleanup cocoa    # wxMac needs some cocoa headers
     cleanup mgl
     cleanup motif
     cleanup os2
     cleanup x11
+    cleanup univ
+    cleanup wine
 
     rm -f wxPython/wx/*  > /dev/null 2>&1
 
@@ -224,10 +226,10 @@ if [ -z "${skiptar}" ]; then
     tar cvf ${distdir}/${tarver}.tar ${tarver} > /dev/null
 
     echo "*** Compressing..."
-    if [ -e ${distdir}/${tarver}.tar.gz ]; then
-       rm ${distdir}/${tarver}.tar.gz
+    if [ -e ${distdir}/${tarver}.tar.bz2 ]; then
+       rm ${distdir}/${tarver}.tar.bz2
     fi
-    gzip --best ${distdir}/${tarver}.tar
+    bzip2 --best ${distdir}/${tarver}.tar
     popd > /dev/null
 fi
 
@@ -235,9 +237,9 @@ fi
 #----------------------------------------------------------------------
 # build the RPM
 
-if [ -z "${skiprpm}" ]; then
+if [ "${skiprpm}" != "1" ]; then
     echo "*** Building RPMs..."
-    cp ${distdir}/${tarver}.tar.gz ${rpmtop}/SOURCES
+    cp ${distdir}/${tarver}.tar.bz2 ${rpmtop}/SOURCES
 
     if [ "${srpmonly}" = "1" ]; then
        rpmbuild -bs \
@@ -281,7 +283,7 @@ fi
 #----------------------------------------------------------------------
 # Cleanup
 
-if [ -z ${skipclean} ]; then
+if [ "${skipclean}" = "0" ]; then
     echo "*** Cleaning up"
     rm -rf ${rpmtop}
     rm -rf ${builddir}