]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - use system lua | |
3 | # NOTE: apt is currently not supported as PLD package manager; | |
4 | # apt 0.5.x was never supported because of too greedy Obsoletes handling | |
5 | # | |
6 | # Conditional build: | |
7 | %bcond_without python # Python binding | |
8 | %bcond_with rpm5 # build with rpm5 instead of rpm.org | |
9 | # | |
10 | Summary: Debian's Advanced Packaging Tool with RPM support | |
11 | Summary(pl.UTF-8): Zaawansowane narzędzie do zarządzania pakietami | |
12 | Summary(pt.UTF-8): Frontend avançado para pacotes rpm e deb | |
13 | Name: apt | |
14 | Version: 0.5.15lorg3.94a | |
15 | Release: 0.1 | |
16 | License: GPL v2+ | |
17 | Group: Applications/Archiving | |
18 | Source0: http://apt-rpm.org/testing/%{name}-%{version}.tar.bz2 | |
19 | # Source0-md5: c1f3702c0a91a31132c1019d559e2ae3 | |
20 | Source1: %{name}.conf | |
21 | Source2: %{name}-sources.list | |
22 | Source3: vendors.list | |
23 | Source4: rpmpriorities | |
24 | Source5: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-pl-man-pages.tar.bz2 | |
25 | # Source5-md5: a3e9b7fd3dbf243d63cbfcc78cb20c1c | |
26 | Patch0: %{name}-rpm5.patch | |
27 | Patch1: %{name}-pld_man.patch | |
28 | Patch2: %{name}-man_fixes.patch | |
29 | Patch3: %{name}-includes.patch | |
30 | Patch4: %{name}-filed.patch | |
31 | Patch5: %{name}-pld_user_in_ftp_pass.patch | |
32 | Patch6: %{name}-format.patch | |
33 | Patch7: %{name}-types.patch | |
34 | Patch8: %{name}-rpm4.14.patch | |
35 | URL: http://apt-rpm.org/ | |
36 | BuildRequires: autoconf >= 2.59 | |
37 | BuildRequires: automake >= 1:1.9.5 | |
38 | BuildRequires: bzip2-devel | |
39 | BuildRequires: docbook-dtd31-sgml | |
40 | BuildRequires: docbook-utils | |
41 | BuildRequires: gettext-tools >= 0.14.5 | |
42 | BuildRequires: libstdc++-devel | |
43 | BuildRequires: libtool | |
44 | BuildRequires: libxml2-devel >= 1:2.6 | |
45 | BuildRequires: ncurses-devel | |
46 | BuildRequires: readline-devel | |
47 | BuildRequires: rpm-devel >= 5 | |
48 | BuildRequires: sqlite3-devel | |
49 | BuildRequires: zlib-devel | |
50 | %if %{with python} | |
51 | BuildRequires: python-devel >= 2 | |
52 | BuildRequires: rpm-pythonprov | |
53 | BuildRequires: swig-python | |
54 | %endif | |
55 | Requires: gnupg | |
56 | Requires: libxml2 >= 1:2.6 | |
57 | Requires: rpm | |
58 | Obsoletes: libapt-pkg < 0.3.19cnc36 | |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
60 | ||
61 | %description | |
62 | A port of Debian's apt tools for RPM based distributions. It provides | |
63 | the apt-get utility that provides a simpler, safer way to install and | |
64 | upgrade packages. APT features complete installation ordering, | |
65 | multiple source capability and several other unique features. | |
66 | ||
67 | %description -l pl.UTF-8 | |
68 | Port debianowego narzędzia APT dla dystrybucji bazujących na zarządcy | |
69 | pakietów RPM. APT dostarcza narzędzie apt-get, które umożliwia prostą, | |
70 | bezpieczną instalację i aktualizację pakietów. Możliwości APT to wybór | |
71 | kolejności instalacji, możliwość ustawienia kilku źródeł pakietów itp. | |
72 | ||
73 | %description -l pt_BR.UTF-8 | |
74 | Um porte das ferramentas apt do Debian para distribuições baseadas no | |
75 | RPM. Sob desenvolvimento, use por sua própria conta e risco. | |
76 | ||
77 | %package devel | |
78 | Summary: Development files for APT's libapt-pkg | |
79 | Summary(pl.UTF-8): Pliki nagłówkowe dla libapt-pkg | |
80 | Summary(pt.UTF-8): Arquivos de desenvolvimento para a biblioteca libapt-pkg do APT | |
81 | Group: Development/Libraries | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | Requires: libstdc++-devel | |
84 | Requires: libxml2-devel >= 1:2.6 | |
85 | Requires: rpm-devel >= 5 | |
86 | Obsoletes: libapt-pkg-devel < 0.3.19cnc36 | |
87 | ||
88 | %description devel | |
89 | This package contains the header files and static libraries for | |
90 | developing with APT's libapt-pkg package manipulation library, | |
91 | modified for RPM. | |
92 | ||
93 | %description devel -l pl.UTF-8 | |
94 | Pakiet zawiera pliki nagłówkowe potrzebne do tworzenia aplikacji | |
95 | korzystających z biblioteki libapt-pkg. | |
96 | ||
97 | %description devel -l pt_BR.UTF-8 | |
98 | Arquivos de desenvolvimento para a biblioteca libapt-pkg do APT | |
99 | ||
100 | %package static | |
101 | Summary: Static libapt-pkg library | |
102 | Summary(pl.UTF-8): Statyczna biblioteka libapt-pkg | |
103 | Group: Development/Libraries | |
104 | Requires: %{name}-devel = %{version}-%{release} | |
105 | Obsoletes: libapt-pkg-static < 0.3.19cnc36 | |
106 | ||
107 | %description static | |
108 | Static libapt-pkg library. | |
109 | ||
110 | %description static -l pl.UTF-8 | |
111 | Statyczna biblioteka libapt-pkg. | |
112 | ||
113 | %package -n python-apt | |
114 | Summary: Python bindings for libapt-pkg library | |
115 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki libapt-pkg | |
116 | Group: Libraries/Python | |
117 | Requires: %{name} = %{version}-%{release} | |
118 | ||
119 | %description -n python-apt | |
120 | Python bindings for libapt-pkg library. | |
121 | ||
122 | %description -n python-apt -l pl.UTF-8 | |
123 | Wiązania Pythona do biblioteki libapt-pkg. | |
124 | ||
125 | %prep | |
126 | %setup -q -a5 | |
127 | %{?with_rpm5:%patch0 -p1} | |
128 | %patch1 -p1 | |
129 | %patch2 -p1 | |
130 | %patch3 -p1 | |
131 | %patch4 -p1 | |
132 | %patch5 -p1 | |
133 | %patch6 -p1 | |
134 | %patch7 -p1 | |
135 | %patch8 -p1 | |
136 | ||
137 | # swig rebuild doesn't work (plain swig cannot cope with class Class::SubClass { }) | |
138 | #%{__rm} python/{apt.py,apt_wrap.cxx} | |
139 | ||
140 | %build | |
141 | %{__gettextize} | |
142 | %{__libtoolize} | |
143 | %{__aclocal} -I m4 -I buildlib | |
144 | %{__autoconf} | |
145 | %{__autoheader} | |
146 | %{__automake} | |
147 | CXXFLAGS="%{rpmcxxflags} -fpermissive" | |
148 | bash %configure | |
149 | ||
150 | %{__make} | |
151 | ||
152 | %if %{with python} | |
153 | %{__make} -C python \ | |
154 | CC="%{__cxx} %{rpmcxxflags} %{rpmcppflags}" \ | |
155 | PYTHON="%{__python}" | |
156 | %endif | |
157 | ||
158 | %install | |
159 | rm -rf $RPM_BUILD_ROOT | |
160 | install -d $RPM_BUILD_ROOT/var/cache/apt/archives/partial \ | |
161 | $RPM_BUILD_ROOT/var/lib/apt/lists/partial \ | |
162 | $RPM_BUILD_ROOT{%{_includedir}/apt-pkg,%{_libdir}/apt} \ | |
163 | $RPM_BUILD_ROOT{%{_mandir}/{,pl/,pt_BR/}man{5,8},%{_bindir}} \ | |
164 | $RPM_BUILD_ROOT{%{_sysconfdir}/apt,%{_datadir}} | |
165 | ||
166 | %{__make} install \ | |
167 | DESTDIR=$RPM_BUILD_ROOT | |
168 | ||
169 | %if %{with python} | |
170 | install -d $RPM_BUILD_ROOT%{py_sitedir} | |
171 | install python/_apt.so $RPM_BUILD_ROOT%{py_sitedir} | |
172 | cp -p python/apt.py $RPM_BUILD_ROOT%{py_sitedir} | |
173 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
174 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
175 | %py_postclean | |
176 | %endif | |
177 | ||
178 | install doc/pl/*.8 $RPM_BUILD_ROOT%{_mandir}/pl/man8 | |
179 | ||
180 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/apt/methods/bzip2 | |
181 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/apt/methods/ssh | |
182 | ln -sf gzip $RPM_BUILD_ROOT%{_libdir}/apt/methods/bzip2 | |
183 | ln -sf rsh $RPM_BUILD_ROOT%{_libdir}/apt/methods/ssh | |
184 | ||
185 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apt/apt.conf | |
186 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/apt/vendors.list | |
187 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/apt/rpmpriorities | |
188 | ||
189 | sed -e s/@ARCH@/%{_target_cpu}/ %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/apt/sources.list | |
190 | ||
191 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{de_DE,de} | |
192 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{es_ES,es} | |
193 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{it_IT,it} | |
194 | ||
195 | %find_lang %{name} | |
196 | ||
197 | %clean | |
198 | rm -rf $RPM_BUILD_ROOT | |
199 | ||
200 | %post -p /sbin/ldconfig | |
201 | %postun -p /sbin/ldconfig | |
202 | ||
203 | %files -f %{name}.lang | |
204 | %defattr(644,root,root,755) | |
205 | # COPYING contains general notes; GPL text is in COPYING.GPL | |
206 | %doc AUTHORS AUTHORS.RPM COPYING ChangeLog TODO doc/examples/* | |
207 | %attr(755,root,root) %{_bindir}/apt-cache | |
208 | %attr(755,root,root) %{_bindir}/apt-cdrom | |
209 | %attr(755,root,root) %{_bindir}/apt-config | |
210 | %attr(755,root,root) %{_bindir}/apt-get | |
211 | %attr(755,root,root) %{_bindir}/apt-shell | |
212 | %attr(755,root,root) %{_bindir}/countpkglist | |
213 | %attr(755,root,root) %{_bindir}/genbasedir | |
214 | %attr(755,root,root) %{_bindir}/genpkglist | |
215 | %attr(755,root,root) %{_bindir}/gensrclist | |
216 | %attr(755,root,root) %{_libdir}/libapt-pkg.so.*.*.* | |
217 | %attr(755,root,root) %ghost %{_libdir}/libapt-pkg.so.3 | |
218 | %dir %{_libdir}/apt | |
219 | %dir %{_libdir}/apt/methods | |
220 | %attr(755,root,root) %{_libdir}/apt/methods/* | |
221 | %dir %{_sysconfdir}/apt | |
222 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apt/apt.conf | |
223 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apt/sources.list | |
224 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apt/vendors.list | |
225 | %config %{_sysconfdir}/apt/rpmpriorities | |
226 | %dir %{_sysconfdir}/apt/apt.conf.d | |
227 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apt/apt.conf.d/multilib.conf | |
228 | %{_mandir}/man5/apt.conf.5* | |
229 | %{_mandir}/man5/apt_preferences.5* | |
230 | %{_mandir}/man5/sources.list.5* | |
231 | %{_mandir}/man5/vendors.list.5* | |
232 | %{_mandir}/man8/apt.8* | |
233 | %{_mandir}/man8/apt-cache.8* | |
234 | %{_mandir}/man8/apt-cdrom.8* | |
235 | %{_mandir}/man8/apt-config.8* | |
236 | %{_mandir}/man8/apt-get.8* | |
237 | %lang(pl) %{_mandir}/pl/man8/apt.8* | |
238 | %lang(pl) %{_mandir}/pl/man8/apt-cache.8* | |
239 | %lang(pl) %{_mandir}/pl/man8/apt-cdrom.8* | |
240 | %lang(pl) %{_mandir}/pl/man8/apt-get.8* | |
241 | /var/cache/apt | |
242 | /var/lib/apt | |
243 | ||
244 | %files devel | |
245 | %defattr(644,root,root,755) | |
246 | %attr(755,root,root) %{_libdir}/libapt-pkg.so | |
247 | %{_libdir}/libapt-pkg.la | |
248 | %{_includedir}/apt-pkg | |
249 | %{_pkgconfigdir}/libapt-pkg.pc | |
250 | ||
251 | %files static | |
252 | %defattr(644,root,root,755) | |
253 | %{_libdir}/libapt-pkg.a | |
254 | ||
255 | %if %{with python} | |
256 | %files -n python-apt | |
257 | %defattr(644,root,root,755) | |
258 | %attr(755,root,root) %{py_sitedir}/_apt.so | |
259 | %{py_sitedir}/apt.py[co] | |
260 | %endif |