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