Check-in [6b55b9da2d]
Overview
Comment:Added script to build release packages
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6b55b9da2dfbf7f999c11f9d05a657fd4ba3ae17
User & Date: rkeene on 2010-06-04 00:21:20
Other Links: manifest | tags
Context
2010-06-05
20:17
Updated to correctly deep copy pTemplate in C_FindObjectsInit

Added support for CKA_TRUSTED check-in: 965b9a28c7 user: rkeene tags: trunk

2010-06-04
00:21
Added script to build release packages check-in: 6b55b9da2d user: rkeene tags: trunk
2010-06-03
23:34
CACKey 0.5.10 check-in: d1b2e5ea57 user: rkeene tags: trunk, 0.5.10
Changes

Added build/make-release version [0254258e24].

            1  +#! /bin/bash
            2  +
            3  +PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin"
            4  +export PATH
            5  +
            6  +VERSION="$1"
            7  +
            8  +if [ -z "${VERSION}" ]; then
            9  +	echo 'Usage: make-release <cackey_version>' >&2
           10  +	exit 1
           11  +fi
           12  +
           13  +for dir in ../../archive/ ../archive/; do
           14  +	CACKEY_TARBALL="$(readlink -f "${dir}/cackey-${VERSION}.tar.gz")"
           15  +
           16  +	if [ -f "${CACKEY_TARBALL}" ]; then
           17  +		break
           18  +	fi
           19  +done
           20  +
           21  +# Create RPM, SRPM, and Slackware package
           22  +## Create RPM/SRPM
           23  +mkdir -p ~/rpmbuild/SPECS ~/rpmbuild/SOURCES
           24  +
           25  +cp "${CACKEY_TARBALL}" ~/rpmbuild/SOURCES/ || exit 1
           26  +tar -xOf "${CACKEY_TARBALL}" cackey-${VERSION}/cackey.spec > ~/rpmbuild/SPECS/cackey-${VERSION}.spec || exit 1
           27  +
           28  +rpmbuild -ba ~/rpmbuild/SPECS/cackey-${VERSION}.spec || exit 1
           29  +
           30  +## Create Slackware package
           31  +mkdir -p ~/rpmbuild/TGZ
           32  +
           33  +WORKDIR="${TMPDIR:-/tmp}/cackey-build-$$${RANDOM}${RANDOM}${RANDOM}"
           34  +WORKDIRINSTROOT="${WORKDIR}/root"
           35  +export WORKDIR WORKDIRINSTROOT
           36  +
           37  +mkdir -p "${WORKDIR}" "${WORKDIRINSTROOT}"
           38  +cd "${WORKDIR}" || exit 1
           39  +
           40  +tar -xf "${CACKEY_TARBALL}"
           41  +
           42  +cd "cackey-${VERSION}" || exit 1
           43  +
           44  +./configure --prefix=/usr
           45  +make
           46  +make install DESTDIR="${WORKDIRINSTROOT}"
           47  +
           48  +mkdir "${WORKDIRINSTROOT}/install"
           49  +cat << __EOF__ > "${WORKDIRINSTROOT}/install/slack-desc"
           50  +cackey: Goverment Smartcard PKCS#11 Provider
           51  +cackey:
           52  +cackey: CACKey provides a standard interface (PKCS#11) for smartcards connected
           53  +cackey: to a PC/SC compliant reader.  It performs a similar function to
           54  +cackey: "CoolKey", but only supports Government Smartcards.  It supports all
           55  +cackey: Government Smartcards that implement the Government Smartcard
           56  +cackey: Interoperability Specification (GSC-IS) v2.1 or newer.
           57  +cackey:
           58  +cackey:
           59  +cackey:
           60  +cackey:
           61  +__EOF__
           62  +cat << __EOF__ > "${WORKDIRINSTROOT}/install/slack-required"
           63  +pcsc-lite
           64  +__EOF__
           65  +
           66  +cd "${WORKDIRINSTROOT}" || exit 1
           67  +makepkg -l y -c n "${WORKDIR}/cackey-${VERSION}-i486-1.tgz"
           68  +gzip -dc "${WORKDIR}/cackey-${VERSION}-i486-1.tgz" | tardy -User root -Group root | gzip -9 > "${WORKDIR}/cackey-${VERSION}-i486-1.tgz.new"
           69  +mv "${WORKDIR}/cackey-${VERSION}-i486-1.tgz.new" "${WORKDIR}/cackey-${VERSION}-i486-1.tgz"
           70  +cp "${WORKDIR}/cackey-${VERSION}-i486-1.tgz" ~/rpmbuild/TGZ
           71  +
           72  +# Cleanup
           73  +rm -rf "${WORKDIR}"