]> git.pld-linux.org Git - packages/poldek.git/blob - poldek.spec
- wget -N downloads .listing for each file,
[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 -p0
106 %{?with_distver:%patch12 -p1}
107
108 %build
109 %{__autopoint}
110 %{__aclocal} -I m4
111 %{__autoconf}
112 %{__autoheader}
113 %{__automake}
114 cp -f config.sub trurlib
115 %configure \
116         %{?with_static:--enable-static} \
117         %{!?with_imode:--disable-imode} \
118         %{?with_curl:--with-curl}
119 %{__make}
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123 install -d $RPM_BUILD_ROOT%{_sysconfdir}
124
125 %{__make} install \
126         DESTDIR=$RPM_BUILD_ROOT
127
128 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
129
130 #
131 # CHANGE IT WHEN SWITCHING poldek.conf FROM AC TO TH !!!
132 #
133 %ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
134 %define         _ftp_arch       %{_target_cpu}
135 %else
136 %ifarch i486
137 %define         _ftp_arch       i386
138 %else
139 %ifarch pentium2 pentium3 pentium4
140 %define         _ftp_arch       i686
141 %else
142 %ifarch sparcv9 sparc64
143 %define         _ftp_arch       sparc
144 %endif
145 %endif
146 %endif
147 %endif
148
149 sed "s|%%ARCH%%|%{_ftp_arch}|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
150
151 %find_lang %{name}
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %triggerpostun -- poldek <= 0.18.3-5
157 if grep -q '^promoteepoch.*yes' %{_sysconfdir}/poldek.conf ; then
158         echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s %{_sysconfdir}/poldek.conf
159 fi
160
161 # otherwise don't touch
162 %ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
163 %triggerpostun -- poldek <= 0.18.7-1
164 echo -e ',s://ftp.pld-linux.org://ftp.%{_target_cpu}.ac.pld-linux.org:g\n,w' |\
165         ed -s /etc/poldek.conf ||:
166 %endif
167
168 %files -f %{name}.lang
169 %defattr(644,root,root,755)
170 %doc README* NEWS TODO *sample* conf/poldekrc*
171 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
172 %attr(755,root,root) %{_bindir}/*
173 %{_mandir}/man1/%{name}*
174 %lang(pl) %{_mandir}/pl/man1/%{name}*
This page took 0.043606 seconds and 3 git commands to generate.