blob: a3153219248a6f28c69dac690e476f3f80fe889b (
plain)
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
|
#!/bin/bash
# BEGIN COPYRIGHT BLOCK
# (C) 2010 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
##
## Include common 'compose' functions
##
COMPOSE_PWD=`dirname $0`
## Always switch into the base directory three levels
## above this shell script prior to executing it so
## that all of its output is written to this directory
cd `dirname $0`/../..
##
## Retrieve the name of this base directory
##
PKI_PWD=`pwd`
##
## Establish packages directory for 'dogtag-pki' META packages
##
PKI_PACKAGES="${PKI_PWD}/packages"
##
## Specify 'dogtag-pki' META functions
##
create_packages_directory()
{
printf "Creating top-level 'packages' directory . . . "
mkdir -p ${PKI_PACKAGES}
printf "done.\n"
}
create_META_package_directories()
{
printf "Creating 'dogtag-pki' META package directories . . . "
mkdir -p ${PKI_PACKAGES}
mkdir -p ${PKI_PACKAGES}/BUILD
mkdir -p ${PKI_PACKAGES}/BUILDROOT
mkdir -p ${PKI_PACKAGES}/RPMS
mkdir -p ${PKI_PACKAGES}/SOURCES
mkdir -p ${PKI_PACKAGES}/SPECS
mkdir -p ${PKI_PACKAGES}/SRPMS
printf "done.\n"
}
build_specified_META_package()
{
package=$1
spec_file_path="${PKI_PWD}/pki/specs"
spec_file="${package}.spec"
printf "BEGIN: Building '${package}' META package . . .\n"
cp ${spec_file_path}/${spec_file} ${PKI_PACKAGES}/SPECS
rpmbuild --define "_topdir ${PKI_PACKAGES}" -ba --clean ${PKI_PACKAGES}/SPECS/${spec_file} > /dev/null 2>&1
printf "END: Building '${package}' META package.\n"
}
##
## Build the 'dogtag-pki' META package
##
create_packages_directory
create_META_package_directories
build_specified_META_package dogtag-pki
|