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