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