Overview
Comment: | Release building updates |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
294977292d7bba4436e671dbe3bd8243 |
User & Date: | rkeene on 2016-02-03 07:11:51 |
Other Links: | manifest | tags |
Context
2016-02-03
| ||
08:03 | Chrome extension cleanups check-in: 482f4fa828 user: rkeene tags: trunk | |
07:11 | Release building updates check-in: 294977292d user: rkeene tags: trunk | |
07:08 | Add header files for pcsclite check-in: b4f1d32aff user: rkeene tags: trunk | |
Changes
Modified build/make-release from [37e5d36a75] to [9bc2bb2091].
1 2 | #! /bin/bash | | | > > > > > > > > > | | | > > > > > | > > | > > > > > > > > > > > > > > > > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #! /bin/bash PATH="${HOME}/root/cross-compilers:${PATH}:/sbin:/usr/sbin:/usr/local/sbin" export PATH VERSION="$1" if [ -z "${VERSION}" ]; then echo 'Usage: make-release <cackey_version>' >&2 exit 1 fi for dir in ../../archive/ ../archive/ ..; do CACKEY_TARBALL="$(readlink -f "${dir}/cackey-${VERSION}.tar.gz")" if [ -f "${CACKEY_TARBALL}" ]; then break fi done if [ ! -f "${CACKEY_TARBALL}" ]; then echo "Tarball not found" >&2 exit 1 fi # Create RPM, SRPM, and Slackware package ## Create RPM/SRPM ( eval "$(setup-cc x86_64-redhat5-linux)" mkdir -p ~/rpmbuild/SPECS ~/rpmbuild/SOURCES cp "${CACKEY_TARBALL}" ~/rpmbuild/SOURCES/ || exit 1 tar -xOf "${CACKEY_TARBALL}" cackey-${VERSION}/cackey.spec > ~/rpmbuild/SPECS/cackey-${VERSION}.spec || exit 1 rpmbuild --target x86_64-redhat5-linux -ba ~/rpmbuild/SPECS/cackey-${VERSION}.spec || exit 1 ) ( eval "$(setup-cc x86_64-redhat5-linux 32)" rpmbuild --target i386-redhat5-linux -ba ~/rpmbuild/SPECS/cackey-${VERSION}.spec || exit 1 ) # Create Debian package from RPM mkdir -p ~/rpmbuild/DEB "$(dirname "$0")/rpm2deb" ~/rpmbuild/RPMS/i386/cackey-${VERSION}-1.i386.rpm ~/rpmbuild/DEB/cackey_${VERSION}-1_i386.deb "$(dirname "$0")/rpm2deb" ~/rpmbuild/RPMS/x86_64/cackey-${VERSION}-1.x86_64.rpm ~/rpmbuild/DEB/cackey_${VERSION}-1_amd64.deb # Create Slackware package mkdir -p ~/rpmbuild/TGZ WORKDIR="${TMPDIR:-/tmp}/cackey-build-$$${RANDOM}${RANDOM}${RANDOM}" WORKDIRINSTROOT="${WORKDIR}/root" export WORKDIR WORKDIRINSTROOT mkdir -p "${WORKDIR}" "${WORKDIRINSTROOT}" cd "${WORKDIR}" || exit 1 tar -xf "${CACKEY_TARBALL}" cd "cackey-${VERSION}" || exit 1 case "$(uname -m)" in x86_64) ARCH=x86_64 LIBDIR=/usr/lib64 ;; i?86) ARCH=i486 LIBDIR=/usr/lib ;; *) echo "Unknown ARCH" >&2 exit 1 ;; esac ./configure --prefix=/usr --libdir=${LIBDIR} make make install DESTDIR="${WORKDIRINSTROOT}" mkdir "${WORKDIRINSTROOT}/install" cat << __EOF__ > "${WORKDIRINSTROOT}/install/slack-desc" cackey: Goverment Smartcard PKCS#11 Provider cackey: |
︙ | ︙ | |||
64 65 66 67 68 69 70 | cackey: __EOF__ cat << __EOF__ > "${WORKDIRINSTROOT}/install/slack-required" pcsc-lite __EOF__ cd "${WORKDIRINSTROOT}" || exit 1 | | | | | | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | cackey: __EOF__ cat << __EOF__ > "${WORKDIRINSTROOT}/install/slack-required" pcsc-lite __EOF__ cd "${WORKDIRINSTROOT}" || exit 1 makepkg -l y -c n "${WORKDIR}/cackey-${VERSION}-${ARCH}-1.tgz" gzip -dc "${WORKDIR}/cackey-${VERSION}-${ARCH}-1.tgz" | tardy -User root -Group root | gzip -9 > "${WORKDIR}/cackey-${VERSION}-${ARCH}-1.tgz.new" mv "${WORKDIR}/cackey-${VERSION}-${ARCH}-1.tgz.new" "${WORKDIR}/cackey-${VERSION}-${ARCH}-1.tgz" cp "${WORKDIR}/cackey-${VERSION}-${ARCH}-1.tgz" ~/rpmbuild/TGZ # Cleanup rm -rf "${WORKDIR}" |