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