diff --git a/contrib/dist/redhat/mc.spec.in b/contrib/dist/redhat/mc.spec.in
index dd2eb5b..d966445 100644
a
|
b
|
|
1 | | # Conditional build (replace "#" with "%" to enable): |
2 | | # |
3 | | #define _with_ncurses 1 # use ncurses |
4 | | #define _with_charset 1 # enable code for charset conversion |
5 | | #define _with_samba 1 # enable SMB/CIFS virtual file system |
6 | | #define _with_ext2undel 1 # compile with ext2 undelete code |
7 | | #define _without_x 1 # avoid dependency on X11 libraries |
8 | | |
9 | 1 | # Note that this is NOT a relocatable package |
10 | | %define ver @VERSION@ |
11 | | %define rpmver @RPM_VERSION@ |
12 | | %define RELEASE 1 |
13 | | %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}%{?dist} |
| 2 | |
| 3 | %if 0%{?el4}%{?el3} |
| 4 | %define _with_screen --with-screen=ncurses |
| 5 | %define _with_glib_static --with-glib-static |
| 6 | %define glib_version glib-2.12.3 |
| 7 | %else |
| 8 | %define _with_screen --with-screen=slang |
| 9 | %endif |
14 | 10 | |
15 | 11 | Summary: User-friendly text console file manager and visual shell |
16 | 12 | Name: mc |
17 | | Version: %rpmver |
18 | | Release: %rel |
| 13 | Version: @RPM_VERSION@ |
| 14 | Release: 1%{?dist} |
19 | 15 | Epoch: 1 |
20 | 16 | License: GPLv2 |
21 | 17 | Group: System Environment/Shells |
22 | | Source0: mc-%{ver}.tar.gz |
| 18 | Source0: %{name}-@VERSION@.tar.gz |
| 19 | |
| 20 | %if 0%{?el4}%{?el3} |
| 21 | Source1: http://ftp.gnome.org/pub/gnome/sources/glib/2.12/%{glib_version}.tar.bz2 |
| 22 | Patch0: glib2-CVE-2008-4316.patch |
| 23 | %endif |
| 24 | |
23 | 25 | URL: http://www.midnight-commander.org/ |
24 | 26 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
25 | | BuildRequires: glib2-devel e2fsprogs-devel slang-devel |
| 27 | BuildRequires: glib2-devel e2fsprogs-devel gpm-devel |
| 28 | |
| 29 | %if 0%{?el5}%{?el4}%{?el3} |
| 30 | BuildRequires: pcre-devel |
| 31 | %endif |
| 32 | |
| 33 | %if 0%{?el4}%{?el3} |
| 34 | BuildRequires: gettext pkgconfig >= 0.8 ncurses-devel |
| 35 | %else |
| 36 | BuildRequires: slang-devel |
| 37 | %endif |
26 | 38 | |
27 | 39 | %description |
28 | | GNU Midnight Commander is a visual file manager. It's a feature rich |
| 40 | GNU Midnight Commander is a visual file manager. It's a feature rich |
29 | 41 | full-screen text mode application that allows you to copy, move and |
30 | 42 | delete files and whole directory trees, search for files and run |
31 | | commands in the subshell. Internal viewer and editor are included. |
32 | | Mouse is supported under X Window System and on Linux console. VFS |
33 | | (Virtual Filesystem) allows you to view archives and files on remote |
34 | | servers (via SAMBA, FTP or SSH). |
| 43 | commands in the subshell. Internal viewer and editor are included. Mouse |
| 44 | is supported on Linux console. VFS (Virtual Filesystem) allows you to |
| 45 | view archives and files on remote servers (via SAMBA, FTP or SSH). |
35 | 46 | |
36 | 47 | %prep |
37 | | %setup -q -n mc-%{ver} |
| 48 | %if 0%{?el4}%{?el3} |
| 49 | |
| 50 | %setup -q -T -c -a 0 |
| 51 | %setup -q -T -D -a 1 |
| 52 | |
| 53 | cd %{glib_version} |
| 54 | %patch0 -p1 -b .CVE-2008-4316 |
| 55 | |
| 56 | %else |
| 57 | |
| 58 | %setup -q -n %{name}-@VERSION@ |
| 59 | |
| 60 | %endif |
38 | 61 | |
39 | 62 | %build |
| 63 | %if 0%{?el4}%{?el3} |
| 64 | |
| 65 | cd %{glib_version} |
| 66 | |
| 67 | RESULT_DIR=`pwd`/result |
| 68 | |
| 69 | CFLAGS="%optflags -fno-strict-aliasing" \ |
| 70 | ./configure \ |
| 71 | --disable-gtk-doc \ |
| 72 | --disable-shared \ |
| 73 | --enable-static \ |
| 74 | --prefix="$RESULT_DIR" \ |
| 75 | --exec-prefix="$RESULT_DIR" \ |
| 76 | --libdir="$RESULT_DIR/usr/%{_lib}" |
| 77 | |
| 78 | make install %{?_smp_mflags} |
| 79 | |
| 80 | cd ../%{name}-@VERSION@ |
| 81 | |
| 82 | %endif |
| 83 | |
| 84 | %if 0%{?el4}%{?el3} |
| 85 | PKG_CONFIG_PATH="$RESULT_DIR/usr/%{_lib}/pkgconfig:$PKG_CONFIG_PATH" ; export PKG_CONFIG_PATH; |
| 86 | %endif |
| 87 | |
40 | 88 | %configure \ |
41 | | --with-screen=slang \ |
42 | | --enable-charset \ |
43 | | --with-samba \ |
44 | | --with-x \ |
45 | | --with-gpm-mouse |
| 89 | %{_with_screen} \ |
| 90 | %{?_with_glib_static} \ |
| 91 | --enable-charset \ |
| 92 | --with-samba \ |
| 93 | --without-x \ |
| 94 | --with-gpm-mouse \ |
| 95 | --disable-doxygen-doc |
| 96 | |
46 | 97 | make %{?_smp_mflags} |
47 | 98 | |
48 | 99 | %install |
49 | 100 | rm -rf $RPM_BUILD_ROOT |
50 | 101 | |
51 | | make install DESTDIR=$RPM_BUILD_ROOT |
| 102 | %if 0%{?el4}%{?el3} |
| 103 | cd %{name}-@VERSION@ |
| 104 | %endif |
| 105 | |
| 106 | make install DESTDIR="$RPM_BUILD_ROOT" |
| 107 | |
| 108 | %if 0%{?el4}%{?el3} |
| 109 | mv ./* ./../ && cd ./../ |
| 110 | rm -rf %{name}-@VERSION@ %{glib_version} |
| 111 | %endif |
52 | 112 | |
53 | 113 | install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d |
54 | 114 | install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d |
… |
… |
rm -rf $RPM_BUILD_ROOT |
61 | 121 | %files -f %{name}.lang |
62 | 122 | %defattr(-, root, root) |
63 | 123 | |
64 | | %doc doc/FAQ COPYING doc/NEWS doc/README |
| 124 | %doc doc/FAQ doc/COPYING doc/NEWS doc/README |
65 | 125 | %{_bindir}/mc |
66 | 126 | %{_bindir}/mcedit |
67 | 127 | %{_bindir}/mcview |
68 | 128 | %{_bindir}/mcmfmt |
69 | | %attr(4755, vcsa, tty) %{_libexecdir}/mc/cons.saver |
| 129 | %attr(4711, vcsa, tty) %{_libexecdir}/mc/cons.saver |
70 | 130 | %{_libexecdir}/mc/mc*sh |
71 | 131 | %{_mandir}/man1/* |
72 | 132 | %lang(es) %{_mandir}/es/man1/mc.1* |
… |
… |
rm -rf $RPM_BUILD_ROOT |
93 | 153 | %dir %{_libexecdir}/mc |
94 | 154 | |
95 | 155 | %changelog |
| 156 | * Sat Aug 01 2009 Yury V. Zaytsev <yury@shurup.com> |
| 157 | - Fixed EL4 (and supposedly EL3) builds |
| 158 | - Fixed some of rpmlint warnings |
| 159 | |
96 | 160 | * Sat Jul 04 2009 Yury V. Zaytsev <yury@shurup.com> |
97 | 161 | - Fix the issue when wrappers were left unpackaged |
98 | 162 | |
99 | 163 | * Thu May 21 2009 Slava Zanko <slavazanko@gmail.com> |
100 | | - Fix install patches: use %{_sysconfdir}/mc directory |
| 164 | - Fix install patches: use %%{_sysconfdir}/mc directory |
101 | 165 | |
102 | 166 | * Fri May 8 2009 Slava Zanko <slavazanko@gmail.com> |
103 | 167 | - Review spec-file to build on the current distributions |
… |
… |
rm -rf $RPM_BUILD_ROOT |
111 | 175 | - Don't rely on brace expansion, it may be disabled |
112 | 176 | |
113 | 177 | * Mon Jan 30 2006 Pavel Roskin <proski@gnu.org> |
114 | | - Avoid using %{_prefix} where more specialized macros are available. |
| 178 | - Avoid using %%{_prefix} where more specialized macros are available. |
115 | 179 | |
116 | 180 | * Tue Aug 02 2005 Pavel Roskin <proski@gnu.org> |
117 | 181 | - Replace obsolete "Copyright" with "License". |
… |
… |
rm -rf $RPM_BUILD_ROOT |
147 | 211 | - Add _with_glib2 option. |
148 | 212 | |
149 | 213 | * Mon Oct 07 2002 Pavel Roskin <proski@gnu.org> |
150 | | - Remove installed mc.sh and mc.csh from %{_prefix}/share/mc/bin to |
| 214 | - Remove installed mc.sh and mc.csh from %%{_prefix}/share/mc/bin to |
151 | 215 | suppress a warning about installed but unpackaged files. |
152 | 216 | |
153 | 217 | * Mon Sep 30 2002 Andrew V. Samoilov <sav@bcs.zp.ua> |
… |
… |
rm -rf $RPM_BUILD_ROOT |
158 | 222 | - Use --with-screen instead of --with-ncurses and --with-included-slang. |
159 | 223 | |
160 | 224 | * Mon Sep 23 2002 Andrew V. Samoilov <sav@bcs.zp.ua> |
161 | | - Restore %config for %{_prefix}/share/mc/mc.charsets. |
162 | | - Restore %{_prefix}/share/mc/edit.spell.rc. |
| 225 | - Restore %%config for %%{_prefix}/share/mc/mc.charsets. |
| 226 | - Restore %%{_prefix}/share/mc/edit.spell.rc. |
163 | 227 | |
164 | 228 | * Sat Sep 21 2002 Pavel Roskin <proski@gnu.org> |
165 | 229 | - Use FHS-compliant paths. |
166 | | - Drop %config from files under /usr/share - users are not supposed to |
| 230 | - Drop %%config from files under /usr/share - users are not supposed to |
167 | 231 | edit them. Local copies under ~/.mc should be used for that. |
168 | 232 | |
169 | 233 | * Wed Aug 21 2002 Pavel Roskin <proski@gnu.org> |
… |
… |
rm -rf $RPM_BUILD_ROOT |
174 | 238 | |
175 | 239 | * Tue Aug 20 2002 Andrew V. Samoilov <sav@bcs.zp.ua> |
176 | 240 | - Add /usr/lib/mc/mc.charsets. |
177 | | - Add %{_mandir}/*/man1/*. |
| 241 | - Add %%{_mandir}/*/man1/*. |
178 | 242 | |
179 | 243 | * Fri Aug 16 2002 Pavel Roskin <proski@gnu.org> |
180 | 244 | - Remove mc.global. |
… |
… |
rm -rf $RPM_BUILD_ROOT |
193 | 257 | - Remove /usr/lib/mc/layout. |
194 | 258 | |
195 | 259 | * Sat Jun 09 2001 Pavel Roskin <proski@gnu.org> |
196 | | - Use %{_prefix} and %{_mandir}. Specify --mandir to configure. |
| 260 | - Use %%{_prefix} and %%{_mandir}. Specify --mandir to configure. |
197 | 261 | |
198 | 262 | * Fri May 25 2001 Pavel Roskin <proski@gnu.org> |
199 | 263 | - Change groups. Don't include locale directories. More config files. |
… |
… |
rm -rf $RPM_BUILD_ROOT |
220 | 284 | |
221 | 285 | * Sat Sep 23 2000 Pavel Roskin <proski@gnu.org> |
222 | 286 | - Include translations with mc, not gmc |
223 | | - chkconfig --del in %preun, not %postun |
| 287 | - chkconfig --del in %%preun, not %%postun |
224 | 288 | - --without-debug not needed |
225 | 289 | - /etc/X11/wmconfig not needed |
226 | 290 | - /etc/pam.d/mcserv shouldn't be executable |
227 | | - New files in %{prefix}/lib/mc/ - translated hints, editor files |
| 291 | - New files in %%{prefix}/lib/mc/ - translated hints, editor files |
228 | 292 | |
229 | 293 | * Thu Sep 09 1999 Elliot Lee <sopwith@redhat.com> |
230 | 294 | - Include .idl files in the package. |
… |
… |
rm -rf $RPM_BUILD_ROOT |
233 | 297 | - Added a build prereq so that rpms get built with documentation ;) |
234 | 298 | |
235 | 299 | * Mon Jul 12 1999 Kjartan Maraas <kmaraas@online.no> |
236 | | - added help and locale files to %files |
| 300 | - added help and locale files to %%files |
237 | 301 | |
238 | 302 | * Tue Jun 22 1999 Vladimir Kondratiev <vkondra@iil.intel.com> |
239 | | - added syntax files to %files |
| 303 | - added syntax files to %%files |
240 | 304 | |
241 | 305 | * Wed May 26 1999 Cody Russell <bratsche@dfw.net> |
242 | | - chmod cons.saver at $RPM_BUILD_ROOT%{prefix}/lib rather than at |
| 306 | - chmod cons.saver at $RPM_BUILD_ROOT%%{prefix}/lib rather than at |
243 | 307 | $RPM_BUILD_ROOT/usr/lib. We can now install to somewhere other than /usr. |
244 | 308 | |
245 | 309 | * Sun Apr 18 1999 Gregory McLean <gregm@comstar.net> |