ROOT-s390="local%file:///var/simplepkg/repos/slack390"
# slackware root repositories
-#ROOT-i386="sarava%http://slack.sarava.org/slackware/"
+ROOT-i386="sarava%http://slack.sarava.org/packages/slackware/"
ROOT-i386="tds%http://slackware.mirrors.tds.net/pub/slackware/"
ROOT-i386="easynews%http://slackware.mirrors.easynews.com/linux/slackware/"
ROOT-i386="gwdg%http://ftp.gwdg.de/pub/linux/slackware/"
- common.sh:
- other minor changes
- repository metainformationg is now added at svn control if applicable
- - new functions default_distro and svn_add
+ - new functions su_svn, regexp_slash, default_distro and svn_add
- new config parameter "TMP"
- renamed function use_svn to templates_under_svn
- simplaret: simplaret_search_and_process_patch do not donwload a package with the same
cwd="`pwd`"
cd $1
- echo '' > CHECKSUMS.md5
+ echo 'MD5 digest for files in this directory.' > CHECKSUMS.md5
+ echo '' >> CHECKSUMS.md5
find . -type f -name '*.tgz' -exec md5sum {} \; >> CHECKSUMS.md5
cat CHECKSUMS.md5 | gzip -9 -c - > CHECKSUMS.md5.gz
}
+function update_md5_checksum {
+
+ # update CHECKSUMS.md5
+ # usage: update_md5_checksums <folder> <file>
+
+ if [ -z "$2" ] || [ ! -d "$1" ] || [ ! -f "$file" ]; then
+ return 1
+ fi
+
+ if ! echo $2 | grep -q -e "^\.\/"; then
+ # add ./ in front of the file name
+ file="./$1"
+ else
+ file="$1"
+ fi
+
+ if [ ! -f CHECKSUMS.md5 ]; then
+ gen_md5_checksums .
+ else
+ # remove the old entry and add a new one
+ sed -i "/ $(regexp_slash $file)$/d" CHECKSUMS.md5
+ md5sum $file >> CHECKSUMS.md5
+ fi
+
+ cat CHECKSUMS.md5 | gzip -9 -c - > CHECKSUMS.md5.gz
+
+ svn_add CHECKSUMS.md5
+ svn_add CHECKSUMS.md5.gz
+
+}
+
function gen_meta {
# generate metafiles
fi
}
+
+function regexp_slash {
+
+ # escape slashes
+ echo $1 | sed -e 's/\//\\\//g'
+
+}
+
+function su_svn {
+
+ # execute svn using a different user
+ if [ ! -z "$SVN_USER" ]; then
+ su $SVN_USER -c "svn $*"
+ else
+ svn $*
+ fi
+
+}
PACKAGE_ARCH="`package_arch $PKG_NAME`"
PACKAGE_BUILD="`package_build $PKG_NAME`"
- for file in `ls $PACKAGE-*-*-*.tgz`; do
+ for file in `find . -name "$PACKAGE-*-*-*.*"`; do
if svn_check $file; then
# Just delete packages with different arch, version or build number
if [ "`package_version $file`" != "$PACKAGE_VERSION" ] || \
rm $file
fi
done
+
+ for file in `find $MAKEPKG_REPOS -name "$PACKAGE.slack-required"`; do
+ if svn_check $file; then
+ if [ $MOVE_SLACK_REQUIRED -eq $off ]; then
+ svn del --force $file
+ elif [ ! -z "$SLACK_REQUIRED" ] && [ "$NEW_REPOS/$PACKAGE.slack-required" != "$file" ]; then
+ svn del --force $file
+ else
+ rm $file
+ fi
cd $cwd
else
- rm $NEW_REPOS/$PACKAGE-*-*-*.tgz 2>/dev/null
+ find $MAKEPKG_REPOS -name "$PACKAGE-*-*-*.*" -exec rm {} 2>/dev/null \;
+ find $MAKEPKG_REPOS -name "$PACKAGE.slack-required" -exec rm {} 2>/dev/null \;
fi
fi
# Update repository FILELIST.TXT, ...
(
+
cd $MAKEPKG_REPOS
gen_filelist
- gen_md5_checksums .
gen_patches_filelist patches
+
+ SUBFOLDER="`echo $NEW_REPOS | sed -e "s/^$(regexp_slash $MAKEPKG_REPOS)//"`"
+ update_md5_checksum $MAKEPKG_REPOS $SUBFOLDER/$PKG_NAME
+ gen_meta $SUBFOLDER/$PKG_NAME
+
+ # update md5 file from patches/ folder if needed
+ for file in `find patches/ -name "$PACKAGE-*-*-*.tgz"`; do
+ SUBFOLDER="`echo $NEW_REPOS | sed -e "s/^$(regexp_slash $MAKEPKG_REPOS/patches)//"`"
+ update_md5_checksum $MAKEPKG_REPOS/patches $SUBFOLDER/$PKG_NAME
+ done
+
)
exit $EXIT_CODE