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: 0.5.10, trunk
Changes

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










































































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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/bash

PATH="${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

# Create RPM, SRPM, and Slackware package
## Create RPM/SRPM
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 -ba ~/rpmbuild/SPECS/cackey-${VERSION}.spec || exit 1

## 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

./configure --prefix=/usr
make
make install DESTDIR="${WORKDIRINSTROOT}"

mkdir "${WORKDIRINSTROOT}/install"
cat << __EOF__ > "${WORKDIRINSTROOT}/install/slack-desc"
cackey: Goverment Smartcard PKCS#11 Provider
cackey:
cackey: CACKey provides a standard interface (PKCS#11) for smartcards connected
cackey: to a PC/SC compliant reader.  It performs a similar function to
cackey: "CoolKey", but only supports Government Smartcards.  It supports all
cackey: Government Smartcards that implement the Government Smartcard
cackey: Interoperability Specification (GSC-IS) v2.1 or newer.
cackey:
cackey:
cackey:
cackey:
__EOF__
cat << __EOF__ > "${WORKDIRINSTROOT}/install/slack-required"
pcsc-lite
__EOF__

cd "${WORKDIRINSTROOT}" || exit 1
makepkg -l y -c n "${WORKDIR}/cackey-${VERSION}-i486-1.tgz"
gzip -dc "${WORKDIR}/cackey-${VERSION}-i486-1.tgz" | tardy -User root -Group root | gzip -9 > "${WORKDIR}/cackey-${VERSION}-i486-1.tgz.new"
mv "${WORKDIR}/cackey-${VERSION}-i486-1.tgz.new" "${WORKDIR}/cackey-${VERSION}-i486-1.tgz"
cp "${WORKDIR}/cackey-${VERSION}-i486-1.tgz" ~/rpmbuild/TGZ

# Cleanup
rm -rf "${WORKDIR}"