/[packages]/updates/3/apt/current/SPECS/apt.spec
ViewVC logotype

Contents of /updates/3/apt/current/SPECS/apt.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 793374 - (show annotations) (download)
Sat Oct 25 22:35:26 2014 UTC (9 years, 5 months ago) by cjw
File size: 9229 byte(s)
- increase cache limit in default config file for current large repositories

1 #Mageia version adapted from Caixa Magica's apt package
2
3 %define name apt
4 %define version 0.5.15lorg3.94
5 %define versionadd pt
6 %define release %mkrel 9
7 %define subrel 2
8 %define _lib_name %{name}-pkg
9 %define lib_name_orig lib%{_lib_name}
10 %define major 4
11 %define libname %mklibname %_lib_name %major
12 %define libnamedevel %mklibname %_lib_name %major -d
13
14
15 Name: %{name}
16 Version: %{version}
17 Release: %{release}
18 Summary: Debian's Advanced Packaging Tool with RPM support
19 Group: System/Packaging
20 Url: http://www.apt-rpm.org/
21 License: GPLv2+
22 Source0: http://apt-rpm.org/releases/%{name}-%{version}%{versionadd}.tar.bz2
23 Source1: %{name}-apt.conf
24 Source2: %{name}-sources.list
25 Source3: %{name}-vendors.list
26 Source4: %{name}-rpmpriorities
27 Source5: %{name}-mageia.conf
28 # not used
29 Source8: apt-pbo
30
31 ## from Caixa Magica's apt:
32 # URPM Lists support
33 # DUDF MANCOOSI project support
34 # Rollback, URPM, DUDF and pbo features
35 Patch1: %{name}-git-cm15-05.patch.bz2
36
37 # enhance the sorting by taking Obsoletes into account
38 Patch3: apt-0.3.19cnc53-stelian-apt-pkg-algorithms-scores.patch
39 # TODO document this patch
40 Patch8: %{name}-0.5.4cnc9-alt-packagemanager-CheckRConflicts.patch
41 # alternative scoring method ( PreDepends implies -1 instead of +50 )
42 Patch9: %{name}-0.5.4cnc9-alt-pkgorderlist_score.patch
43 # add # to the list of the forbidden characters in the name of cdrom
44 Patch11: apt-0.5.15lorg3.2-alt-specialchars.patch
45
46 # s/de_DE/de/ and /it_IT/it/ in po files
47 Patch14: %{name}-invalid-lc-messages-dir.patch
48
49 # use the moo
50 Patch15: apt-moo.patch
51
52 # a quick bugfix to make build-dep work
53 Patch18: %{name}-build-dep.patch
54
55 # (cjw) fix segfault on large transactions by removing call to rpmReadConfigFiles()0
56 # that isn't needed
57 Patch25: apt-0.5.15lorg3.94pt-drop-unneeded-rpmReadConfigFiles.patch
58
59 # (cjw) from git: fix build with rpm 4.9
60 Patch26: apt.git-dfcec4ea45210b5d83ab65ecadb35001c7d39913.patch
61 Patch27: apt.git-3b4e4dcf7a86f96da1124c6913ff7e66e4f1ccff.patch
62 # (cjw) caixa magica rpm 4.9 fixes
63 Patch28: apt-cm-rpm4.9.patch
64 # (cjw) _dbapi macro disappeared, so drop the rpm backwards compatibility code using it
65 Patch29: apt-0.5.15lorg3.94pt-rpm4.9-dbapi.patch
66 # (cjw) fix build with glibc 2.16
67 Patch30: apt-0.5.15-glibc-2.16.patch
68 # (cjw) fix for ABI breakage hacked into RPM for /usr move
69 Patch31: apt-0.5.15lorg3.94pt-ignore-usrmove_hack_in_rpm.patch
70 # (cjw) synthesis may have requires names that contain '['
71 Patch35: apt-0.5.15lorg3.94pt-brackets.patch
72 # (cjw) one line in synthesis can be 78000 chars, overflowing 16-bit offsets
73 Patch36: apt-0.5.15lorg3.94pt-synthesis-section-offset-overflow.patch
74 # (cjw) fix potential buffer overflow caused by use of a fixed string buffer + strcat
75 Patch37: apt-0.5.15lorg3.94pt-CVE-2014-6273.patch
76
77 Requires: gnupg
78 Requires: gzip
79 Requires: %{name}-common
80 BuildRequires: gettext-devel
81 BuildRequires: ncurses-devel
82 BuildRequires: readline-devel
83 BuildRequires: rpm-devel >= 4.6
84 # BuildRequires: python-devel
85 BuildRequires: libpopt-devel
86 BuildRequires: libxml2-devel
87 BuildRequires: sqlite3-devel
88 BuildRequires: lua5.1-devel
89 BuildRequires: perl
90 BuildRequires: jsoncpp-devel >= 0.5.0
91 Epoch: 1
92
93 %description
94 A port of Debian's apt tools for RPM based distributions.
95 Original RPM port done by and for Conectiva. It provides
96 the apt-get utility that provides a simple way to install
97 and upgrade packages. APT features complete installation
98 ordering, multiple source capability and several other
99 unique features.
100
101 %package -n %{libname}
102 Summary: Libraries for %{name}
103 Group: System/Libraries
104 Provides: %{lib_name_orig} = %{epoch}:%{version}-%{release}
105 Requires: %name-common
106 #For uuidgen
107 Requires: e2fsprogs
108
109 %description -n %{libname}
110 This package contains APT's libapt-pkg package manipulation library
111 modified for RPM.
112
113 %package -n %{libnamedevel}
114 Summary: Development files for %{name}
115 Group: Development/C
116 Requires: %{libname} = %{epoch}:%{version}-%{release}
117 Provides: %{lib_name_orig}-devel
118 # only header files in this package...
119 Requires: jsoncpp-devel
120
121 %description -n %{libnamedevel}
122 This package contains the header files and static libraries for
123 developing with APT's libapt-pkg package manipulation library,
124 modified for RPM.
125
126 %package pbo
127 Summary: Alternate dependency solver for apt.
128 Group: System/Packaging
129 BuildArch: noarch
130 Requires: %{name}-common
131 Requires: perl
132 Requires: minisat+
133 Requires: perl-libapt-pkg
134 %description pbo
135 Alternate dependency solver for the apt package manager.
136 Currently in testing.
137
138 %package common
139 Summary: Common file for %{name} frontend
140 Group: System/Packaging
141 %description common
142 This package contains the needed files for various apt-frontend,
143 such as synaptic, aptitude.
144
145 %prep
146 %setup -q -n %{name}-%{version}%{versionadd}
147 %patch1 -p1
148 %patch3 -p1 -b .scores
149 %patch8 -p1 -b .checkrconflicts
150 %patch9 -p1 -b .predepends-scores
151 %patch11 -p1 -b .specialchars
152 %patch14 -p1
153 %patch15 -p1 -b .moo
154 %patch18 -p1 -b .build-dep-fix
155 %patch26 -p1 -b .headerUnlink
156 %patch27 -p1 -b .fdLink+fdFree
157 %patch28 -p1 -b .cm-rpm4.9
158 %patch29 -p1 -b .dbapi
159 %patch25 -p1 -b .segfault
160 %patch30 -p1 -b .glibc2_16
161 %patch31 -p1 -b .usrmove_broken_rpm
162 %patch35 -p1 -b .brackets
163 %patch36 -p1 -b .overflow
164 %patch37 -p1 -b .cve-2014-6273
165
166 cat %{SOURCE1} > apt.conf
167 sed 's/%%ARCH%%/%{_target_cpu}/' %{SOURCE2} > sources.list
168 cat %{SOURCE3} > vendors.list
169 cat %{SOURCE4} > rpmpriorities
170 cat %{SOURCE5} > mageia.conf
171
172 %build
173 rm -f configure
174 libtoolize --copy --force --install
175 aclocal -I m4
176 automake -a -c
177 autoconf
178 %configure2_5x
179
180 # This next line is necessary because of the invalid-lc-messages-dir patch
181 (cd po; cp -f de_DE.po de.po; cp -f it_IT.po it.po)
182
183
184 # Parallel make is taken account in the configure script
185 %make NOISY=1
186
187 #( cd python; %make )
188
189 %install
190 cat <<EOF >README.Mageia
191 This version uses the synthesis form of the hdlist which is specified as a urpm
192 source. The "rpm" source represents a debian-style pkglist, so full hdlists
193 cannot be used anymore.
194
195 EOF
196
197 rm -rf $RPM_BUILD_ROOT
198 %makeinstall
199 rm -rf $RPM_BUILD_ROOT%{_bindir}/apt-pbo
200
201 install -d -m 755 $RPM_BUILD_ROOT/var/cache/%{name}/archives/partial
202 install -d -m 755 $RPM_BUILD_ROOT/var/lib/%{name}/lists/partial
203
204 install -d -m 755 $RPM_BUILD_ROOT%{_includedir}/apt-pkg
205 mv $RPM_BUILD_ROOT%{_includedir}/*.h $RPM_BUILD_ROOT%{_includedir}/apt-pkg
206
207 install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/apt
208 echo "APT::Install-Suggests \"true\";" > $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d/01-suggests.conf
209 install -m 644 apt.conf $RPM_BUILD_ROOT%{_sysconfdir}/apt
210 install -m 644 *.list $RPM_BUILD_ROOT%{_sysconfdir}/apt
211 install -m 644 rpmpriorities $RPM_BUILD_ROOT%{_sysconfdir}/apt
212
213 install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d
214 install -m 644 mageia.conf $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf.d
215
216 install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/apt/translate.list.d
217
218 install -d -m 755 $RPM_BUILD_ROOT%{_var}/lib/apt/dudf
219
220 #install -d -m 755 $RPM_BUILD_ROOT%{_sbindir}
221 #install -m 755 %SOURCE8 $RPM_BUILD_ROOT%{_sbindir}
222
223 install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
224 #AG: Script directory, this should really be created by "make install" itself
225 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/apt/scripts
226
227 %find_lang %{name}
228 %find_lang %{lib_name_orig}-pkg3.3
229 cat %{lib_name_orig}-pkg3.3.lang >> %{name}.lang
230 rm -f %{lib_name_orig}-pkg3.3.lang
231
232
233 %triggerun -- apt < 0.5.4
234 # Convert options from 0.3.X to 0.5.X
235 CONF=/etc/apt/apt.conf
236 if [ -f $CONF ]; then
237 mv -f $CONF $CONF.rpmold
238 sed -e 's/HoldPkgs/Hold/' \
239 -e 's/AllowedDupPkgs/Allow-Duplicated/' \
240 -e 's/IgnorePkgs/Ignore/' \
241 -e 's/PostInstall/Post-Install/' \
242 -e 's/.*Methods .*//' \
243 $CONF.rpmold > $CONF
244 if [ $? -ne 0 ]; then
245 mv -f $CONF.rpmold $CONF
246 echo "warning: couldn't convert old apt options"
247 else
248 echo "warning: original apt.conf saved as apt.conf.rpmold" 2>&1
249 fi
250 fi
251
252 %triggerun -- apt > 0.5.4, apt < 0.5.4cnc4-1cl
253 # Fix bug in the trigger of first snapshot versions
254 CONF=/etc/apt/apt.conf
255 if [ -f $CONF ]; then
256 mv $CONF $CONF.rpmtmp.$$
257 sed -e 's/Holds/Hold/' \
258 $CONF.rpmtmp.$$ > $CONF
259 if [ $? -ne 0 ]; then
260 mv -f $CONF.rpmtmp.$$ $CONF
261 else
262 rm -f $CONF.rpmtmp.$$
263 fi
264 fi
265
266 %clean
267 rm -rf %{buildroot}
268
269 %files -f %{name}.lang
270 %defattr(-,root,root)
271 %doc COPYING* doc/*.txt doc/examples AUTHORS* README.Mageia
272 %{_bindir}/*
273 %{_mandir}/man5/*
274 %{_mandir}/man8/*
275
276 #files pbo
277 #{_sbindir}/apt-pbo
278
279 %files common
280 %{_libdir}/%{name}
281 /var/cache/%{name}
282 /var/lib/%{name}
283 %{_datadir}/%{name}
284 %dir %{_sysconfdir}/%{name}
285 %config(noreplace) %{_sysconfdir}/apt/apt.conf
286 %config(noreplace) %{_sysconfdir}/apt/sources.list
287 %config(noreplace) %{_sysconfdir}/apt/vendors.list
288 %config(noreplace) %{_sysconfdir}/apt/rpmpriorities
289 %dir %{_sysconfdir}/apt/apt.conf.d
290 %config(noreplace) %{_sysconfdir}/apt/apt.conf.d/mageia.conf
291 %config(noreplace) %{_sysconfdir}/apt/apt.conf.d/multilib.conf
292 %config(noreplace) %{_sysconfdir}/apt/apt.conf.d/01-suggests.conf
293 %dir %{_sysconfdir}/apt/translate.list.d
294
295 %files -n %{libname}
296 %defattr(-,root,root)
297 %{_libdir}/*.so.*
298
299 %files -n %{libnamedevel}
300 %defattr(-,root,root)
301 %{_includedir}/apt-pkg
302 %{_libdir}/*.so
303 %{_libdir}/*.a
304 %{_libdir}/*.la
305 %{_libdir}/pkgconfig/*.pc
306
307
308

  ViewVC Help
Powered by ViewVC 1.1.30