]> git.pld-linux.org Git - packages/poldek.git/blob - poldek.spec
- fix segmentation violation
[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 %bcond_with     curl    # link with curl
6 #
7 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
8 %define ver_db  4.2.50-1
9 %define ver_rpm 4.3-0.20030610.29
10 Summary:        RPM packages management helper tool
11 Summary(pl):    Pomocnicze narzêdzie do zarz±dzania pakietami RPM
12 Name:           poldek
13 Version:        0.18.6
14 Release:        3
15 License:        GPL v2
16 Group:          Applications/System
17 Source0:        http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.bz2
18 # Source0-md5:  21e4b2fa1695d95479e01fe82a4d84da
19 Source1:        %{name}.conf
20 Patch0:         %{name}-etc_dir.patch
21 Patch1:         %{name}-retr_term.patch
22 Patch2:         %{name}-simplestatic.patch
23 Patch3:         %{name}-pkgorder.patch
24 Patch4:         %{name}-sigsegv.patch
25 URL:            http://team.pld.org.pl/~mis/poldek/
26 BuildRequires:  automake
27 BuildRequires:  autoconf
28 BuildRequires:  bzip2-devel
29 %{?with_curl:BuildRequires:     curl-devel >= 7.8}
30 BuildRequires:  db-devel >= %{ver_db}
31 BuildRequires:  gettext-autopoint
32 BuildRequires:  openssl-devel >= 0.9.7d
33 BuildRequires:  pcre-devel
34 BuildRequires:  popt-devel
35 BuildRequires:  readline-devel
36 BuildRequires:  rpm-devel >= %{ver_rpm}
37 BuildRequires:  zlib-devel
38 BuildRequires:  perl-tools-pod
39 %if %{with static}
40 BuildRequires:  bzip2-static
41 %{?with_curl:BuildRequires:     curl-static}
42 BuildRequires:  db-static >= %{ver_db}
43 BuildRequires:  glibc-static
44 BuildRequires:  libselinux-static
45 BuildRequires:  ncurses-static
46 BuildRequires:  openssl-static
47 BuildRequires:  pcre-static
48 BuildRequires:  popt-static
49 BuildRequires:  readline-static
50 BuildRequires:  rpm-static
51 BuildRequires:  zlib-static
52 %endif
53 Requires:       db >= %{ver_db}
54 Requires:       ed
55 Requires:       rpm >= %{ver_rpm}
56 Requires:       sed
57 Requires:       openssl >= 0.9.7c
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 poldek is an RPM package management tool which allows you to easily
62 perform package verification, installation (including system
63 installation from scratch), upgrading, and removal.
64
65 Program can be used in batch (like apt-get from Debian's APT) or
66 interactive mode. The interactive mode puts you into a readline
67 interface with command line autocompletion and history, similar to the
68 shell mode of Perl's CPAN.
69
70 %{?with_static:This version is statically linked.}
71
72 %{!?with_imode:This version hasn't got interactive mode.}
73
74 %description -l pl
75 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
76 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
77 usuwania pakietów.
78
79 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
80 interaktywnym. Tryb interaktywny posiada interfejs readline z
81 dope³nianiem komend i histori±, podobny do trybu shell perlowego
82 modu³u CPAN.
83
84 %{?with_static:Ta wersja jest konsolidowana statycznie.}
85
86 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %patch1 -p1
92 %patch2 -p0
93 %patch3 -p0
94 %patch4 -p0
95
96 %build
97 %{__autopoint}
98 %{__aclocal} -I m4
99 %{__autoconf}
100 %{__automake}
101 cp -f config.sub trurlib
102 %configure \
103         %{?with_static:--enable-static} \
104         %{!?with_imode:--disable-imode} \
105         %{?with_curl:--with-curl}
106 %{__make}
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT%{_sysconfdir}
111
112 %{__make} install \
113         DESTDIR=$RPM_BUILD_ROOT
114
115 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
116 sed "s|/i686/|/%{_target_cpu}/|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
117
118 %find_lang %{name}
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %triggerpostun -- poldek <= 0.18.3-5
124 if grep -q '^promoteepoch.*yes' /etc/poldek.conf ; then
125         echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s /etc/poldek.conf
126 fi
127
128 %files -f %{name}.lang
129 %defattr(644,root,root,755)
130 %doc README* NEWS TODO *sample* conf/poldekrc*
131 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
132 %attr(755,root,root) %{_bindir}/*
133 %{_mandir}/man1/%{name}*
134 %lang(pl) %{_mandir}/pl/man1/%{name}*
This page took 0.059232 seconds and 4 git commands to generate.