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