4 echo "Usage: $0 <package-name> [<package-location>]"
5 echo "Example: $0 sxemacs-22.1.9"
8 type tla >/dev/null 2>&1 && TLA=tla
9 if [ -z "${TLA}" ]; then
10 echo "Cannot find tla."
14 BASE=$(echo ${BASE} | sed -e 's/\.tgz$//g' -e 's/\.tar\.gz$//g' -e 's/\.tar$//g')
15 if [ ! -f ./autogen.sh -o ! -f ./sxemacs.pc.in ]; then
16 echo "Please run this script from the top of the sxemacs source directory.\n"
20 if [ -z "MAKEPKGYES" ]; then
21 echo "The next step will erase ALL files not under source control from the source tree"
22 echo -n "Continue [Y/N]"
27 YN=$(echo ${YN} | tr [:upper:] [:lower:])
28 if [ "$YN" != "y" -a "$YN" != "yes" ]; then
32 ${TLA} export "/tmp/${1}" || STATUS="FAIL_EXPORT"
33 if [ -n "$STATUS" ]; then
34 echo "Either your tla does not support export or it failed to create the destination"
37 HAMMER=BHFH ./autogen.sh || STATUS="FAIL_AUTOGEN"
38 if [ -n "$STATUS" ]; then
39 echo "The autogen process failed"
42 for f in $(${TLA} inventory -p -B); do
43 cp -r -v --parents "${f}" "/tmp/${1}"
45 ${TLA} changelog --untagged > "/tmp/${1}/ChangeLog" || STATUS="FAIL_CHANGELOG"
46 if [ -n "$STATUS" ]; then
47 echo "The changelog generation failed. Continuing..."
54 echo "Using ${CURDIR} as package destination"
56 DEST="$(pwd)/${BASE}.tar.gz"
58 tar --create --owner=0 --group=0 --gzip --file "${DEST}" "${BASE}"
59 md5sum "${DEST}" > "${DEST}.md5"