]> git.pld-linux.org Git - packages/poldek.git/blob - poldek.spec
- merge from DEVEL
[packages/poldek.git] / poldek.spec
1 #
2 # Conditional build:
3 %bcond_with     static  # don't use shared libraries
4 %bcond_without  imode   # don't build interactive mode
5 #
6 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
7 %define ver_db  4.2.50-1
8 %define ver_rpm 4.4.1
9 %define snap    20050613.22
10 Summary:        RPM packages management helper tool
11 Summary(pl):    Pomocnicze narzêdzie do zarz±dzania pakietami RPM
12 Name:           poldek
13 Version:        0.19.0
14 Release:        0.2
15 License:        GPL v2
16 Group:          Applications/System
17 Source0:        http://team.pld.org.pl/~mis/poldek/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
18 # Source0-md5:  d529239d781c3d9e36577305d46d1a37
19 Source1:        %{name}.conf
20 URL:            http://team.pld.org.pl/~mis/poldek/
21 BuildRequires:  automake
22 BuildRequires:  autoconf
23 BuildRequires:  bzip2-devel
24 BuildRequires:  db-devel >= %{ver_db}
25 BuildRequires:  gettext-autopoint
26 BuildRequires:  home-etc-devel
27 BuildRequires:  libtool
28 BuildRequires:  openssl-devel >= 0.9.7c
29 BuildRequires:  pcre-devel
30 BuildRequires:  perl-tools-pod
31 BuildRequires:  popt-devel
32 BuildRequires:  readline-devel
33 BuildRequires:  rpm-devel >= %{ver_rpm}
34 BuildRequires:  zlib-devel
35 %if %{with static}
36 BuildRequires:  bzip2-static
37 BuildRequires:  db-static >= %{ver_db}
38 BuildRequires:  glibc-static
39 BuildRequires:  ncurses-static
40 BuildRequires:  openssl-static
41 BuildRequires:  pcre-static
42 BuildRequires:  popt-static
43 BuildRequires:  readline-static
44 BuildRequires:  rpm-static
45 BuildRequires:  zlib-static
46 %endif
47 Requires:       db >= %{ver_db}
48 Requires:       openssl >= 0.9.7c
49 Requires:       rpm >= %{ver_rpm}
50 Requires:       sed
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
54 poldek is an RPM package management tool which allows you to easily
55 perform package verification, installation (including system
56 installation from scratch), upgrading, and removal.
57
58 Program can be used in batch (like apt-get from Debian's APT) or
59 interactive mode. The interactive mode puts you into a readline
60 interface with command line autocompletion and history, similar to the
61 shell mode of Perl's CPAN.
62
63 %{?with_static:This version is statically linked.}
64
65 %{!?with_imode:This version hasn't got interactive mode.}
66
67 %{!?with_imode:This version hasn't got interactive mode.}
68
69 %description -l pl
70 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
71 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
72 usuwania pakietów.
73
74 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
75 interaktywnym. Tryb interaktywny posiada interfejs readline z
76 dope³nianiem komend i histori±, podobny do trybu shell perlowego
77 modu³u CPAN.
78
79 %{?with_static:Ta wersja jest konsolidowana statycznie.}
80
81 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
82
83 %package libs
84 Summary:        poldek library
85 Summary(pl):    Biblioteki poldka
86 Group:          Libraries
87
88 %description libs
89 poldek library.
90
91 %description libs -l pl
92 Biblioteki poldka.
93
94 %package devel
95 Summary:        Header files for poldek libraries
96 Summary(pl):    Pliki nag³ówkowe bibliotek poldka
97 Group:          Development/Libraries
98 Requires:       %{name}-libs = %{version}-%{release}
99
100 %description devel
101 Header files for poldek libraries.
102
103 %description devel -l pl
104 Pliki nag³ówkowe bibliotek poldka.
105
106 %package static
107 Summary:        poldek static libraries
108 Summary(pl):    Biblioteki statyczne poldka
109 Group:          Development/Libraries
110 Requires:       %{name}-devel = %{version}-%{release}
111
112 %description static
113 poldek static libraries.
114
115 %description static -l pl
116 Biblioteki statyczne poldka.
117
118 %prep
119 %setup -q -n %{name}-%{version}-cvs%{snap}
120
121 %build
122 %{__autopoint}
123 %{__aclocal} -I m4
124 %{__autoconf}
125 %{__automake}
126 cp -f config.sub trurlib
127 # glibc 2.3.5 workaround (to be removed when new snap come)
128 perl -pi -e 's|HAVE_FOPENCOOKIE|HAVE_FOPENCOOKIE_XXX|g' trurlib/nstream.c
129
130 %configure \
131         %{?with_static:--enable-static} \
132         %{!?with_imode:--disable-imode} \
133         --enable-nls
134 %{__make}
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT%{_sysconfdir}
139
140 %{__make} install \
141         DESTDIR=$RPM_BUILD_ROOT
142
143 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
144
145 #
146 # CHANGE IT WHEN SWITCHING poldek.conf FROM AC TO TH !!!
147 #
148 %ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
149 %define         _ftp_arch       %{_target_cpu}
150 %else
151 %ifarch i486
152 %define         _ftp_arch       i386
153 %else
154 %ifarch pentium2 pentium3 pentium4
155 %define         _ftp_arch       i686
156 %else
157 %ifarch sparcv9 sparc64
158 %define         _ftp_arch       sparc
159 %endif
160 %endif
161 %endif
162 %endif
163
164 sed "s|%%ARCH%%|%{_ftp_arch}|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
165
166 %find_lang %{name}
167
168 %post libs      -p /sbin/ldconfig
169 %postun libs    -p /sbin/ldconfig
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %triggerpostun -- poldek <= 0.18.3-5
175 sed -i -e '/^promoteepoch:.*yes/s/^/#/' %{_sysconfdir}/poldek.conf
176
177 # otherwise don't touch
178 %ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
179 %triggerpostun -- poldek <= 0.18.7-1
180 sed -i -e 's://ftp.pld-linux.org://ftp.ac.pld-linux.org:g' /etc/poldek.conf
181 %endif
182
183 %files -f %{name}.lang
184 %defattr(644,root,root,755)
185 %doc README* NEWS TODO conf/*.conf
186 %dir %{_sysconfdir}/%{name}
187 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}/*.conf
188 %attr(755,root,root) %{_bindir}/*
189 %dir %{_libdir}/%{name}
190 %attr(755,root,root) %{_libdir}/%{name}/*
191 %{_mandir}/man1/%{name}*
192 %lang(pl) %{_mandir}/pl/man1/%{name}*
193
194 %files libs
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/lib*.so.*
197
198 %files devel
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_libdir}/lib*.so
201 %{_includedir}/*
202 %{_libdir}/lib*.la
203
204 %files static
205 %defattr(644,root,root,755)
206 %{_libdir}/lib*.a
This page took 0.03905 seconds and 4 git commands to generate.