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