ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/apt.spec
(Generate patch)

Comparing COMP/CMSDIST/apt.spec (file contents):
Revision 1.49 by eulisse, Thu Jul 12 10:05:50 2007 UTC vs.
Revision 1.75 by eulisse, Mon Nov 26 16:01:24 2007 UTC

# Line 1 | Line 1
1 < ### RPM external apt 0.5.15lorg3.2-CMS3
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
5 >
6 > %if "%{?online_release:set}" != "set"
7   Requires: libxml2 beecrypt rpm zlib bz2lib openssl
8 + %else
9 + Requires: libxml2 beecrypt rpm bz2lib
10 + %endif
11 +
12   Patch0: apt-rpm449
13   Patch1: apt-rpm446
14   Patch2: apt
15 <
15 > Patch3: apt-multiarch
16   %if "%(echo %{cmsos} | cut -d_ -f 2 | sed -e 's|.*64.*|64|')" == "64"
17   %define libdir lib64
18   %else
19   %define libdir lib
20   %endif
21  
18
22   %prep
23   %setup -n %n-%{realversion}
24   case $RPM_VERSION in
# Line 28 | Line 31 | case $RPM_VERSION in
31   esac
32  
33   # scandir has a different prototype between macosx and linux.
34 < %if "%(uname)" == "Darwin"
34 > case %cmsplatf in
35 >    osx*)
36   %patch2 -p1
37 < %endif
37 >    ;;
38 > esac
39 >
40 > %patch3 -p1
41  
42   %build
43   export CFLAGS="-O0 -g"
# Line 53 | Line 60 | make %makeprocesses
60   %install
61   make install
62   mkdir -p %{i}/etc/profile.d
63 +
64   (echo "#!/bin/sh"; \
65   echo "source $RPM_ROOT/etc/profile.d/init.sh"; \
66   echo "source $LIBXML2_ROOT/etc/profile.d/init.sh" ) > %{i}/etc/profile.d/dependencies-setup.sh
# Line 60 | Line 68 | mkdir -p %{i}/etc/profile.d
68   echo "source $RPM_ROOT/etc/profile.d/init.csh"; \
69   echo "source $LIBXML2_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh
70  
71 + cp %_sourcedir/bootstrap %{i}/bin/bootstrap.sh
72  
73   mkdir -p %{i}/etc/apt
74   cat << \EOF_APT_CONF > %{i}/etc/apt.conf
# Line 121 | Line 130 | rpm http://cmsrep.cern.ch cms/cpt/Softwa
130   rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external
131   # This are defined to support experimental repositories. The bootstrap file rewrites and uncomments
132   # them when passed the appropriate commandline option.
133 < ## rpm @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@  
134 < ## rpm-src @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
133 > #;rpm http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@  
134 > #;rpm-src http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
135   EOF_SOURCES_LIST
136  
137   cat << \EOF_RPMPRIORITIES > %{i}/etc/rpmpriorities
# Line 132 | Line 141 | EOF_RPMPRIORITIES
141  
142   cat << \EOF_BIN_APT_CACHE_WRAPPER > %{i}/bin/apt-cache-wrapper
143   #!/bin/sh
144 < touch %{instroot}/log.txt
145 < echo $@ >> %{instroot}/log.txt
144 > mkdir -p %{instroot}/var/log/rpm
145 > touch %{instroot}/var/log/rpm/log.txt
146 > echo $@ >> %{instroot}/var/log/rpm/log.txt
147   apt-cache $@
148   EOF_BIN_APT_CACHE_WRAPPER
149   chmod +x %{i}/bin/apt-cache-wrapper
150  
151   cat << \EOF_BIN_APT_GET_WRAPPER > %{i}/bin/apt-get-wrapper
152   #!/bin/sh
153 < touch %{instroot}/log.txt
154 < echo $@ >> %{instroot}/log.txt
153 > mkdir -p %{instroot}/var/log/rpm
154 > touch %{instroot}/var/log/rpm/log.txt
155 > echo $@ >> %{instroot}/var/log/rpm/log.txt
156   apt-get $@
157   EOF_BIN_APT_GET_WRAPPER
158   chmod +x %{i}/bin/apt-get-wrapper
# Line 154 | Line 165 | if [ X"$(id -u)" = X0 ]; then
165    echo "(We recommend reading any standard unix security guide.)" 1>&2
166    exit 1
167   fi
168 < touch %{instroot}/log.txt
169 < echo rpm ${1+"$@"} >> %{instroot}/log.txt
168 > mkdir -p %{instroot}/var/log/rpm
169 > touch %{instroot}/var/log/rpm/log.txt
170 > echo rpm ${1+"$@"} >> %{instroot}/var/log/rpm/log.txt
171   exec rpm ${1+"$@"}
172   EOF_BIN_RPM
173   chmod +x %{i}/bin/rpm-wrapper
174  
163 cat %_sourcedir/bootstrap | perl -p -e "s!\@CMSPLATF\@!%{cmsplatf}!g;
164                                        s!\@GCC_VERSION\@!$GCC_VERSION!g;
165                                        s!\@RPM_VERSION\@!$RPM_VERSION!g;
166                                        s!\@DB4_VERSION\@!$DB4_VERSION!g;
167                                        s!\@LIBXML2_VERSION\@!$LIBXML2_VERSION!g;
168                                        s!\@OPENSSL_VERSION\@!$OPENSSL_VERSION!g;
169                                        s!\@BEECRYPT_VERSION\@!$BEECRYPT_VERSION!g;
170                                        s!\@BZ2LIB_VERSION\@!$BZ2LIB_VERSION!g;
171                                        s!\@ZLIB_VERSION\@!$ZLIB_VERSION!g;
172                                        s!\@EXPAT_VERSION\@!$EXPAT_VERSION!g;
173                                        s!\@ELFUTILS_VERSION\@!$ELFUTILS_VERSION!g;
174                                        s!\@NEON_VERSION\@!$NEON_VERSION!g;
175                                        s!\@GCC_REVISION\@!$GCC_REVISION!g;
176                                        s!\@BEECRYPT_REVISION\@!$BEECRYPT_REVISION!g;
177                                        s!\@RPM_REVISION\@!$RPM_REVISION!g;
178                                        s!\@OPENSSL_REVISION\@!$OPENSSL_REVISION!g;
179                                        s!\@DB4_REVISION\@!$DB4_REVISION!g;
180                                        s!\@LIBXML2_REVISION\@!$LIBXML2_REVISION!g;
181                                        s!\@BZ2LIB_REVISION\@!$BZ2LIB_REVISION!g;
182                                        s!\@ZLIB_REVISION\@!$ZLIB_REVISION!g;
183                                        s!\@EXPAT_REVISION\@!$EXPAT_REVISION!g;
184                                        s!\@NEON_REVISION\@!$NEON_REVISION!g;
185                                        s!\@ELFUTILS_REVISION\@!$ELFUTILS_REVISION!g;
186                                        s!\@APT_VERSION\@!%{v}!g;
187                                        s!\@APT_REVISION\@!%{pkgrevision}!g;
188                                        s!\@INSTROOT\@!%{instroot}!g;
189                                        " > %{i}/bin/bootstrap-%{cmsplatf}.sh
190
191 cat %_sourcedir/cms-apt-migration | perl -p -i -e "s!\@CMSPLATF\@!%{cmsplatf}!g;
192                                        s!\@GCC_VERSION\@!$GCC_VERSION!g;
193                                        s!\@RPM_VERSION\@!$RPM_VERSION!g;
194                                        s!\@DB4_VERSION\@!$DB4_VERSION!g;
195                                        s!\@LIBXML2_VERSION\@!$LIBXML2_VERSION!g;
196                                        s!\@OPENSSL_VERSION\@!$OPENSSL_VERSION!g;
197                                        s!\@BEECRYPT_VERSION\@!$BEECRYPT_VERSION!g;
198                                        s!\@BZ2LIB_VERSION\@!$BZ2LIB_VERSION!g;
199                                        s!\@ZLIB_VERSION\@!$ZLIB_VERSION!g;
200                                        s!\@EXPAT_VERSION\@!$EXPAT_VERSION!g;
201                                        s!\@ELFUTILS_VERSION\@!$ELFUTILS_VERSION!g;
202                                        s!\@NEON_VERSION\@!$NEON_VERSION!g;
203                                        s!\@GCC_REVISION\@!$GCC_REVISION!g;
204                                        s!\@BEECRYPT_REVISION\@!$BEECRYPT_REVISION!g;
205                                        s!\@RPM_REVISION\@!$RPM_REVISION!g;
206                                        s!\@OPENSSL_REVISION\@!$OPENSSL_REVISION!g;
207                                        s!\@DB4_REVISION\@!$DB4_REVISION!g;
208                                        s!\@LIBXML2_REVISION\@!$LIBXML2_REVISION!g;
209                                        s!\@BZ2LIB_REVISION\@!$BZ2LIB_REVISION!g;
210                                        s!\@ZLIB_REVISION\@!$ZLIB_REVISION!g;
211                                        s!\@EXPAT_REVISION\@!$EXPAT_REVISION!g;
212                                        s!\@NEON_REVISION\@!$NEON_REVISION!g;
213                                        s!\@ELFUTILS_REVISION\@!$ELFUTILS_REVISION!g;
214                                        s!\@APT_VERSION\@!%{v}!g;
215                                        s!\@APT_REVISION\@!%{pkgrevision}!g;
216                                        s!\@INSTROOT\@!%{instroot}!g;" %{i}/bin/cms-apt-migration-%{cmsplatf}.sh
217
175   %post
176   mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/apt/lists/partial
177   mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/rpm

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines