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