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.33 by eulisse, Mon Jun 25 11:08:16 2007 UTC vs.
Revision 1.73 by elmer, Thu Nov 22 22:44:31 2007 UTC

# Line 1 | Line 1
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 < Requires: libxml2 beecrypt rpm zlib bz2lib openssl
5 >
6 > %define requires libxml2 beecrypt rpm zlib bz2lib openssl
7 >
8 > %if "%(echo %{cmsos} | sed -e 's|slc.online_.*|online|')" == "online"
9 > %define requires libxml2 beecrypt rpm bz2lib
10 > %endif
11 >
12 > Requires: %requires
13 >
14   Patch0: apt-rpm449
15   Patch1: apt-rpm446
16 + Patch2: apt
17 + Patch3: apt-multiarch
18   %if "%(echo %{cmsos} | cut -d_ -f 2 | sed -e 's|.*64.*|64|')" == "64"
19   %define libdir lib64
20   %else
# Line 22 | Line 31 | case $RPM_VERSION in
31   %patch1 -p0
32          ;;
33   esac
34 +
35 + # scandir has a different prototype between macosx and linux.
36 + case %cmsplatf in
37 +    osx*)
38 + %patch2 -p1
39 +    ;;
40 + esac
41 +
42 + %patch3 -p1
43 +
44   %build
45 < export CFLAGS="-O2 -g"
46 < export CXXFLAGS="-O2 -g"
47 < export CPPFLAGS="-I$BEECRYPT_ROOT/include -I$RPM_ROOT/include -I$RPM_ROOT/include/rpm"
48 < export LDFLAGS="-L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}"
45 > export CFLAGS="-O0 -g"
46 > export CXXFLAGS="-O0 -g"
47 > export CPPFLAGS="-I$BZ2LIB_ROOT/include -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include -I$RPM_ROOT/include/rpm"
48 > export LDFLAGS="-L$BZ2LIB_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}"
49   export LIBDIR="$LIBS"
50   export LIBXML2_CFLAGS="-I$LIBXML2_ROOT/include/libxml2 -I$BEECRYPT_ROOT/include -I$RPM_ROOT/include"
51   export LIBXML2_LIBS="-lxml2 -L$LIBXML2_ROOT/lib -L$BEECRYPT_ROOT/%{libdir} -L$RPM_ROOT/%{libdir}"
# Line 43 | Line 62 | make %makeprocesses
62   %install
63   make install
64   mkdir -p %{i}/etc/profile.d
65 +
66   (echo "#!/bin/sh"; \
67   echo "source $RPM_ROOT/etc/profile.d/init.sh"; \
68   echo "source $LIBXML2_ROOT/etc/profile.d/init.sh" ) > %{i}/etc/profile.d/dependencies-setup.sh
# Line 50 | Line 70 | mkdir -p %{i}/etc/profile.d
70   echo "source $RPM_ROOT/etc/profile.d/init.csh"; \
71   echo "source $LIBXML2_ROOT/etc/profile.d/init.csh" ) > %{i}/etc/profile.d/dependencies-setup.csh
72  
73 + cp %_sourcedir/bootstrap %{i}/bin/bootstrap.sh
74 +
75   mkdir -p %{i}/etc/apt
76   cat << \EOF_APT_CONF > %{i}/etc/apt.conf
77   Dir "%{instroot}"
# Line 97 | Line 119 | Debug::pkgProblemResolver="1";
119   RPM
120   {
121      PM "external";
122 <    Options { "--define";"_rpmlock_path %{instroot}/%{cmsplatf}/var/lib/rpm/lock";"--dbpath";"%{instroot}/var/lib/rpm";"--nodeps";};
123 <    Install-Options { "--define";"_rpmlock_path %{instroot}/%{cmsplatf}/var/lib/rpm/lock";"--nodeps";"--force";"--dbpath";"%{instroot}/%{cmsplatf}/var/lib/rpm";"--prefix";"%{instroot}";};
122 >    Options { };
123 >    Install-Options { "--force";"--prefix";"%{instroot}";"--ignoreos";"--ignorearch";};
124      RootDir "%{instroot}";
125      Architecture "%{cmsplatf}";
126   };
127   EOF_APT_CONF
128  
129 +
130   cat << \EOF_SOURCES_LIST > %{i}/etc/sources.list
131 < rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms.eulisse/apt/%{cmsplatf} cms lcg external
132 < rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms.eulisse/apt/%{cmsplatf} cms lcg external
131 > rpm http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external
132 > rpm-src http://cmsrep.cern.ch cms/cpt/Software/download/cms/apt/%{cmsplatf} cms lcg external
133   # This are defined to support experimental repositories. The bootstrap file rewrites and uncomments
134   # them when passed the appropriate commandline option.
135 < ## rpm @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@  
136 < ## rpm-src @SERVER@ @SERVER_PATH@/@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
135 > ##rpm http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@  
136 > ##rpm-src http://@SERVER@ @SERVER_PATH@@REPOSITORY@/apt/%{cmsplatf} @GROUPS@
137   EOF_SOURCES_LIST
138  
139   cat << \EOF_RPMPRIORITIES > %{i}/etc/rpmpriorities
# Line 120 | Line 143 | EOF_RPMPRIORITIES
143  
144   cat << \EOF_BIN_APT_CACHE_WRAPPER > %{i}/bin/apt-cache-wrapper
145   #!/bin/sh
146 < touch %{instroot}/log.txt
147 < echo $@ >> %{instroot}/log.txt
146 > mkdir -p %{instroot}/var/log/rpm
147 > touch %{instroot}/var/log/rpm/log.txt
148 > echo $@ >> %{instroot}/var/log/rpm/log.txt
149   apt-cache $@
150   EOF_BIN_APT_CACHE_WRAPPER
151   chmod +x %{i}/bin/apt-cache-wrapper
152  
153   cat << \EOF_BIN_APT_GET_WRAPPER > %{i}/bin/apt-get-wrapper
154   #!/bin/sh
155 < touch %{instroot}/log.txt
156 < echo $@ >> %{instroot}/log.txt
155 > mkdir -p %{instroot}/var/log/rpm
156 > touch %{instroot}/var/log/rpm/log.txt
157 > echo $@ >> %{instroot}/var/log/rpm/log.txt
158   apt-get $@
159   EOF_BIN_APT_GET_WRAPPER
160   chmod +x %{i}/bin/apt-get-wrapper
# Line 142 | Line 167 | if [ X"$(id -u)" = X0 ]; then
167    echo "(We recommend reading any standard unix security guide.)" 1>&2
168    exit 1
169   fi
170 < touch %{instroot}/log.txt
171 < echo rpm ${1+"$@"} >> %{instroot}/log.txt
170 > mkdir -p %{instroot}/var/log/rpm
171 > touch %{instroot}/var/log/rpm/log.txt
172 > echo rpm ${1+"$@"} >> %{instroot}/var/log/rpm/log.txt
173   exec rpm ${1+"$@"}
174   EOF_BIN_RPM
175   chmod +x %{i}/bin/rpm-wrapper
176  
151 cat %_sourcedir/bootstrap | perl -p -e "s!\@CMSPLATF\@!%{cmsplatf}!g;
152                                        s!\@GCC_VERSION\@!$GCC_VERSION!g;
153                                        s!\@RPM_VERSION\@!$RPM_VERSION!g;
154                                        s!\@DB4_VERSION\@!$DB4_VERSION!g;
155                                        s!\@LIBXML2_VERSION\@!$LIBXML2_VERSION!g;
156                                        s!\@OPENSSL_VERSION\@!$OPENSSL_VERSION!g;
157                                        s!\@BEECRYPT_VERSION\@!$BEECRYPT_VERSION!g;
158                                        s!\@BZ2LIB_VERSION\@!$BZ2LIB_VERSION!g;
159                                        s!\@ZLIB_VERSION\@!$ZLIB_VERSION!g;
160                                        s!\@EXPAT_VERSION\@!$EXPAT_VERSION!g;
161                                        s!\@ELFUTILS_VERSION\@!$ELFUTILS_VERSION!g;
162                                        s!\@NEON_VERSION\@!$NEON_VERSION!g;
163                                        s!\@GCC_REVISION\@!$GCC_REVISION!g;
164                                        s!\@BEECRYPT_REVISION\@!$BEECRYPT_REVISION!g;
165                                        s!\@RPM_REVISION\@!$RPM_REVISION!g;
166                                        s!\@OPENSSL_REVISION\@!$OPENSSL_REVISION!g;
167                                        s!\@DB4_REVISION\@!$DB4_REVISION!g;
168                                        s!\@LIBXML2_REVISION\@!$LIBXML2_REVISION!g;
169                                        s!\@BZ2LIB_REVISION\@!$BZ2LIB_REVISION!g;
170                                        s!\@ZLIB_REVISION\@!$ZLIB_REVISION!g;
171                                        s!\@EXPAT_REVISION\@!$EXPAT_REVISION!g;
172                                        s!\@NEON_REVISION\@!$NEON_REVISION!g;
173                                        s!\@ELFUTILS_REVISION\@!$ELFUTILS_REVISION!g;
174                                        s!\@APT_VERSION\@!%{v}!g;
175                                        s!\@APT_REVISION\@!%{pkgrevision}!g;
176                                        s!\@INSTROOT\@!%{instroot}!g;
177                                        " > %{i}/bin/bootstrap-%{cmsplatf}.sh
178
177   %post
178 + ln -sf %{v} $RPM_INSTALL_PREFIX/%{cmsplatf}/external/apt/latest
179   mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/apt/lists/partial
180   mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/rpm
181   mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/var/lib/cache/%{cmsplatf}/partial
# Line 192 | Line 191 | mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}
191   %{relocateConfig}bin/apt-get-wrapper
192   %{relocateConfig}bin/rpm-wrapper
193   %{relocateConfig}etc/apt.conf
195
196

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines