File: BUILDRPMS

package info (click to toggle)
xastir 2.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,284 kB
  • sloc: ansic: 119,926; perl: 7,810; sh: 1,309; makefile: 392; sql: 102
file content (140 lines) | stat: -rwxr-xr-x 5,589 bytes parent folder | download | duplicates (5)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/sh


# This is an example script used by one of the developers to ease
# the workload.  It's not intended to be used by the general
# userbase.  It's included with the Xastir sources so that it
# doesn't get lost if the developer should suddenly drop out of
# sight.


# Run this as root from the xastir source directory (top-level).
# It runs some # of the below commands as "archer", others as "root".
# When the build is complete it copies the RPM files to the Wetnet server.



# Run these commands as "root".
#
echo
echo
echo "***********************************"
echo "***** Cleaning up Directories *****"
echo "***********************************"
rm -rf /usr/src/packages/SOURCES/xastir*
rm -rf /usr/src/packages/RPMS/x86_64/xastir*
rm -rf /usr/src/packages/SRPMS/xastir*



# Run these commands as "archer".
#
echo "Davis..."
su -c " cd Davis; ./bootstrap.sh; ./configure; make clean" archer
echo "LaCrosse..."
su -c " cd LaCrosse; ./bootstrap.sh; ./configure; make clean" archer
# These are just to get the configure and spec files in shape.
# Configure options don't matter yet here.
echo
echo
echo "********************************************"
echo "***** Setting up CONFIG and SPEC files *****"
echo "********************************************"
su -c " cd Davis; ./bootstrap.sh; ./configure; make clean" archer
su -c " cd LaCrosse; ./bootstrap.sh; ./configure; make clean" archer
#
# NOTE:  CPPFLAGS below is for OpenSUSE specifically:  Remove it if building RPMs for other Linux OS'es.
su -c " ./bootstrap.sh; ./configure CPPFLAGS='-I/usr/include/libgeotiff'; make clean; make dist" archer



# Run these commands as "root":
#
cp xastir-*.tar.gz /usr/src/packages/SOURCES/.



# Run these commands as "root":
#
# Build minimum system (only ImageMagick and internal Shapelib
# included), binary package only.  Rename this file so that the
# following rpmbuild doesn't overwrite it.
echo
echo
echo "*******************************************"
echo "***** Creating MINIMUM binary package *****"
echo "*******************************************"
(cd /usr/src/packages/SOURCES; tar xzf xastir-*.tar.gz; rpmbuild -bb --clean xastir-2.0.8/xastir-min.spec)
mv /usr/src/packages/RPMS/x86_64/xastir-2.0.8-1.x86_64.rpm /usr/src/packages/RPMS/x86_64/xastir-2.0.8-min.x86_64.rpm
#
#
# Build maximum system (all optional libraries included), binary and
# source packages.
echo
echo
echo "***************************************************************"
echo "***** Creating MAXIMUM binary package plus source package *****"
echo "***************************************************************"
(cd /usr/src/packages/SOURCES; tar xzf xastir-*.tar.gz; rpmbuild -ba --clean xastir-2.0.8/xastir.spec)
mv /usr/src/packages/RPMS/x86_64/xastir-2.0.8-1.x86_64.rpm /usr/src/packages/RPMS/x86_64/xastir-2.0.8-max.x86_64.rpm



# Run these commands as "root":
#
# Create a local yum repository in the correct format:
mkdir /usr/tmp/repo /usr/tmp/repo/x86_64 /usr/tmp/repo/src
cp /usr/src/packages/RPMS/x86_64/* /usr/tmp/repo/x86_64
cp /usr/src/packages/SRPMS/* /usr/tmp/repo/src
#
# Create repo
(cd /usr/tmp/repo/x86_64; createrepo .)
(cd /usr/tmp/repo/src; createrepo .)
#
# Create a .tgz of the repo
(cd /usr/tmp/repo; tar czvf xastir-repo.tgz *)



# Run these commands as "archer":
#
echo
echo
echo "**************************************************************"
echo "***** Copying packages to Wetnet and setting permissions *****"
echo "**************************************************************"
#su -c " cd /usr/bin; scp /usr/src/packages/RPMS/x86_64/xastir-2.0.5-max.x86_64.rpm we7u@wetnet.net:/home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/SuSE-12.1/x86_64/." archer
#su -c " cd /usr/bin; scp /usr/src/packages/RPMS/x86_64/xastir-2.0.5-min.x86_64.rpm we7u@wetnet.net:/home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/SuSE-12.1/x86_64/." archer
#su -c " cd /usr/bin; scp /usr/src/packages/SRPMS/xastir-2.0.5-1.src.rpm we7u@wetnet.net:/home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/SuSE-12.1/src/." archer
#su -c " cd /usr/bin; ssh -l we7u wetnet.net 'chmod 644 /home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/SuSE-12.1/x86_64/*.rpm'" archer
#su -c " cd /usr/bin; ssh -l we7u wetnet.net 'chmod 644 /home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/SuSE-12.1/src/*.rpm'" archer
#
# Copy the tgz of the repo up to Wetnet:
su -c " cd /usr/bin; scp /usr/tmp/repo/xastir-repo.tgz we7u@wetnet.net:/home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/." archer
#
# Remove the repodata files so we don't get multiples:
su -c " cd /usr/bin; ssh -l we7u wetnet.net 'rm -rf /home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/SuSE-12.1/x86_64/repodata /home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/SuSE-12.1/src/repodata'" archer
#
# Untar the repo.  Will merge the files in with our other repo files:
su -c " cd /usr/bin; ssh -l we7u wetnet.net 'cd /home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM; tar xzvf xastir-repo.tgz'" archer
#
# Remove tgz file:
su -c " cd /usr/bin; ssh -l we7u wetnet.net 'rm /home/we7u/public_html/Downloads/aprs/xastir/SUSE-RPM/xastir-repo.tgz'" archer



echo
echo
echo "***********************************"
echo "***** Cleaning up build files *****"
echo "***********************************"
rm -rf /usr/src/packages/SOURCES/xastir*
#rm -rf /usr/src/packages/RPMS/x86_64/xastir*
#rm -rf /usr/src/packages/SRPMS/xastir*
#rm -rf /usr/tmp/repo



# NOTE:  Will have to set priority of the new repository to 100 (default is 99) in order to override the OpenSuSE-distributed version of Xastir tends to be older.