1 |
< |
### RPM external apt 0.5.15lorg3.2-wt1 |
1 |
> |
### RPM external apt 0.5.15lorg3.2-CMS18 |
2 |
|
## INITENV SET APT_CONFIG %{i}/etc/apt.conf |
3 |
– |
|
3 |
|
Source: http://apt-rpm.org/releases/%n-%realversion.tar.bz2 |
4 |
|
Source1: bootstrap |
5 |
+ |
Source2: cms-apt-migration |
6 |
+ |
|
7 |
+ |
%if "%{?online_release:set}" != "set" |
8 |
|
Requires: libxml2 beecrypt rpm zlib bz2lib openssl |
9 |
+ |
%else |
10 |
+ |
Requires: libxml2 beecrypt rpm bz2lib |
11 |
+ |
%endif |
12 |
+ |
|
13 |
|
Patch0: apt-rpm449 |
14 |
|
Patch1: apt-rpm446 |
15 |
+ |
Patch2: apt |
16 |
+ |
Patch3: apt-multiarch |
17 |
|
%if "%(echo %{cmsos} | cut -d_ -f 2 | sed -e 's|.*64.*|64|')" == "64" |
18 |
|
%define libdir lib64 |
19 |
|
%else |
30 |
|
%patch1 -p0 |
31 |
|
;; |
32 |
|
esac |
33 |
+ |
|
34 |
+ |
# scandir has a different prototype between macosx and linux. |
35 |
+ |
%if "%(uname)" == "Darwin" |
36 |
+ |
%patch2 -p1 |
37 |
+ |
%endif |
38 |
+ |
|
39 |
+ |
%patch3 -p1 |
40 |
+ |
|
41 |
|
%build |
42 |
|
export CFLAGS="-O0 -g" |
43 |
|
export CXXFLAGS="-O0 -g" |
44 |
< |
export CPPFLAGS="-I$BEECRYPT_ROOT/include -I$RPM_ROOT/include -I$RPM_ROOT/include/rpm" |
45 |
< |
export LDFLAGS="-L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}" |
44 |
> |
export CPPFLAGS="-I$BZ2LIB_ROOT/include -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include -I$RPM_ROOT/include/rpm" |
45 |
> |
export LDFLAGS="-L$BZ2LIB_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}" |
46 |
|
export LIBDIR="$LIBS" |
47 |
|
export LIBXML2_CFLAGS="-I$LIBXML2_ROOT/include/libxml2 -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include" |
48 |
|
export LIBXML2_LIBS="-lxml2 -L$LIBXML2_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}" |
66 |
|
echo "source $RPM_ROOT/etc/profile.d/init.csh"; \ |
67 |
|
echo "source $LIBXML2_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh |
68 |
|
|
69 |
+ |
|
70 |
|
mkdir -p %{i}/etc/apt |
71 |
|
cat << \EOF_APT_CONF > %{i}/etc/apt.conf |
72 |
|
Dir "%{instroot}" |
114 |
|
RPM |
115 |
|
{ |
116 |
|
PM "external"; |
117 |
< |
Options { "--define";"_rpmlock_path %{instroot}/%{cmsplatf}/var/lib/rpm/lock";"--dbpath";"%{instroot}/var/lib/rpm";"--nodeps";}; |
118 |
< |
Install-Options { "--define";"_rpmlock_path %{instroot}/%{cmsplatf}/var/lib/rpm/lock";"--nodeps";"--force";"--dbpath";"%{instroot}/%{cmsplatf}/var/lib/rpm";"--prefix";"%{instroot}";}; |
117 |
> |
Options { }; |
118 |
> |
Install-Options { "--force";"--prefix";"%{instroot}";"--ignoreos";"--ignorearch";}; |
119 |
|
RootDir "%{instroot}"; |
120 |
|
Architecture "%{cmsplatf}"; |
121 |
|
}; |
122 |
|
EOF_APT_CONF |
123 |
|
|
124 |
+ |
|
125 |
|
cat << \EOF_SOURCES_LIST > %{i}/etc/sources.list |
126 |
< |
rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms.eulisse/apt/%{cmsplatf} cms lcg external |
127 |
< |
rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms.eulisse/apt/%{cmsplatf} cms lcg external |
126 |
> |
rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external |
127 |
> |
rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external |
128 |
|
# This are defined to support experimental repositories. The bootstrap file rewrites and uncomments |
129 |
|
# them when passed the appropriate commandline option. |
130 |
< |
## rpm @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
131 |
< |
## rpm-src @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
130 |
> |
##rpm http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
131 |
> |
##rpm-src http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@ |
132 |
|
EOF_SOURCES_LIST |
133 |
|
|
134 |
|
cat << \EOF_RPMPRIORITIES > %{i}/etc/rpmpriorities |
194 |
|
s!\@INSTROOT\@!%{instroot}!g; |
195 |
|
" > %{i}/bin/bootstrap-%{cmsplatf}.sh |
196 |
|
|
197 |
+ |
cat %_sourcedir/cms-apt-migration | perl -p -e "s!\@CMSPLATF\@!%{cmsplatf}!g; |
198 |
+ |
s!\@GCC_VERSION\@!$GCC_VERSION!g; |
199 |
+ |
s!\@RPM_VERSION\@!$RPM_VERSION!g; |
200 |
+ |
s!\@DB4_VERSION\@!$DB4_VERSION!g; |
201 |
+ |
s!\@LIBXML2_VERSION\@!$LIBXML2_VERSION!g; |
202 |
+ |
s!\@OPENSSL_VERSION\@!$OPENSSL_VERSION!g; |
203 |
+ |
s!\@BEECRYPT_VERSION\@!$BEECRYPT_VERSION!g; |
204 |
+ |
s!\@BZ2LIB_VERSION\@!$BZ2LIB_VERSION!g; |
205 |
+ |
s!\@ZLIB_VERSION\@!$ZLIB_VERSION!g; |
206 |
+ |
s!\@EXPAT_VERSION\@!$EXPAT_VERSION!g; |
207 |
+ |
s!\@ELFUTILS_VERSION\@!$ELFUTILS_VERSION!g; |
208 |
+ |
s!\@NEON_VERSION\@!$NEON_VERSION!g; |
209 |
+ |
s!\@GCC_REVISION\@!$GCC_REVISION!g; |
210 |
+ |
s!\@BEECRYPT_REVISION\@!$BEECRYPT_REVISION!g; |
211 |
+ |
s!\@RPM_REVISION\@!$RPM_REVISION!g; |
212 |
+ |
s!\@OPENSSL_REVISION\@!$OPENSSL_REVISION!g; |
213 |
+ |
s!\@DB4_REVISION\@!$DB4_REVISION!g; |
214 |
+ |
s!\@LIBXML2_REVISION\@!$LIBXML2_REVISION!g; |
215 |
+ |
s!\@BZ2LIB_REVISION\@!$BZ2LIB_REVISION!g; |
216 |
+ |
s!\@ZLIB_REVISION\@!$ZLIB_REVISION!g; |
217 |
+ |
s!\@EXPAT_REVISION\@!$EXPAT_REVISION!g; |
218 |
+ |
s!\@NEON_REVISION\@!$NEON_REVISION!g; |
219 |
+ |
s!\@ELFUTILS_REVISION\@!$ELFUTILS_REVISION!g; |
220 |
+ |
s!\@APT_VERSION\@!%{v}!g; |
221 |
+ |
s!\@APT_REVISION\@!%{pkgrevision}!g; |
222 |
+ |
s!\@INSTROOT\@!%{instroot}!g;" > %{i}/bin/cms-apt-migration-%{cmsplatf}.sh |
223 |
+ |
|
224 |
|
%post |
225 |
|
mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/apt/lists/partial |
226 |
|
mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/rpm |
237 |
|
%{relocateConfig}bin/apt-get-wrapper |
238 |
|
%{relocateConfig}bin/rpm-wrapper |
239 |
|
%{relocateConfig}etc/apt.conf |
195 |
– |
|