create-tarball: Make it more comfortable to use the --copy-docs option.
[samba.git] / release-scripts / create-tarball
index ab27f082225343f98ed1c3f7d4366b0ade4b2b51..9e6b8fe0ff5d4f2f805c071db22599b88b57f59b 100755 (executable)
@@ -116,6 +116,19 @@ function buildDocs
        rsync -av "${OPT_DOCSDIR}"/ docs/
        exitOnError $? "Failed top copy docs from ${OPT_DOCSDIR}"
 
+       cd docs/
+       /bin/rm -rf test.pdf Samba4*pdf htmldocs/Samba4* htmldocs/test
+       if [ -d manpages-3 ]; then
+               mv manpages-3 manpages
+       fi
+       if [ -d htmldocs/manpages-3 ]; then
+               mv htmldocs/manpages-3 htmldocs/manpages
+       fi
+       # Sync thanks, history and registry/ into the docs dir
+       rsync -Ca --exclude=.svn ../../$OPT_BRANCH/docs-xml/registry ../docs/
+       rsync -Ca --exclude=.svn ../../$OPT_BRANCH/docs-xml/archives/ ../docs/
+       cd ../
+
        return 0
     fi
 
@@ -183,6 +196,10 @@ function main
     if [ -n "$vendor_version" ]; then
        version="$version-$vendor_version"
     fi
+    vendor_patch=`grep "define SAMBA_VERSION_VENDOR_PATCH" $VER_H | awk '{print $3}'`
+    if [ -n "$vendor_patch" ]; then
+       version="$version-$vendor_patch"
+    fi
     version=`echo $version | sed 's/\"//g'`
 
     echo "Creating release tarball for Samba $version"
@@ -193,6 +210,16 @@ function main
 
     pushd ../samba-${version}
 
+    # Remove RFCs as they are non-free content (with a strict interpretation of
+    # the DFSG)
+
+    if [ -d source4 ]; then
+       echo "Removing RFCs"
+       find source4/ -name "rfc*.txt" -exec rm -f {} \;
+       rm -f source4/ldap_server/devdocs/draft-armijo-ldap-syntax-00.txt
+       rm -f source4/ldap_server/devdocs/ldapext-ldapv3-vlv-04.txt
+    fi
+
     packaging/bin/update-pkginfo ${version} 1 ""
 
     buildDocs