Ticket #3714: (dialog_change_screen_size): fix dialog resizing order.
[midnight-commander.git] / contrib / dist / redhat / mc.spec.in
blobb017787bc83f5e6a4c92207c181d1c2ab85ae94c
1 # Note that this is NOT a relocatable package
3 %define legacy_rhel 0%{?el4}%{?el3}
5 %if %{legacy_rhel}
6 %define _with_screen --with-screen=ncurses
7 %define _with_glib_static --with-glib-static
8 %define glib_version 2.12
9 %define glib_stepping .3
10 %else
11 %define _with_screen --with-screen=slang
12 %endif
14 %define mc_version @DISTR_VERSION@
15 %define mc_release @DISTR_RELEASE@
16 %define mc_tarball @VERSION@
18 Summary: User-friendly text console file manager and visual shell
19 Name: mc
20 Version: %{mc_version}
21 Release: %{mc_release}%{?dist}
22 Epoch: 3
23 License: GPL3+
24 Group: System Environment/Shells
25 Source0: %{name}-%{mc_tarball}.tar.gz
27 %if %{legacy_rhel}
28 Source1: http://ftp.gnome.org/pub/gnome/sources/glib/%{glib_version}/glib-%{glib_version}%{?glib_stepping}.tar.bz2
29 Patch0: glib2-CVE-2008-4316.patch
30 %endif
32 URL: http://www.midnight-commander.org/
33 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
34 BuildRequires: e2fsprogs-devel gpm-devel perl
36 %if %{legacy_rhel}%{?el5}
37 BuildRequires: pcre-devel
38 %endif
40 %if %{legacy_rhel}
42 BuildRequires: ncurses-devel
44 # From Glib
45 BuildRequires: pkgconfig gettext
47 %else
48 BuildRequires: glib2-devel slang-devel
49 %endif
51 %description
52 GNU Midnight Commander is a visual file manager. It's a feature rich
53 full-screen text mode application that allows you to copy, move and
54 delete files and whole directory trees, search for files and run
55 commands in the subshell. Internal viewer and editor are included. Mouse
56 is supported on Linux console. VFS (Virtual Filesystem) allows you to
57 view archives and files on remote servers (via SAMBA, FTP or SSH).
59 %prep
61 %setup -q -n %{name}-%{mc_tarball}
63 %if %{legacy_rhel}
65 %setup -q -T -D -a 1 -n %{name}-%{mc_tarball}
67 cd glib-%{glib_version}%{?glib_stepping}
68 %patch0 -p1 -b .CVE-2008-4316
70 %endif
72 %build
74 %if %{legacy_rhel}
76 pushd glib-%{glib_version}%{?glib_stepping}
77 RESULT_DIR=`pwd`/result
79 ./configure \
80 --disable-gtk-doc \
81 --disable-shared \
82 --enable-static \
83 --prefix="$RESULT_DIR" \
84 --exec-prefix="$RESULT_DIR" \
85 --libdir="$RESULT_DIR/usr/%{_lib}"
87 %{__make} %{?_smp_mflags} CFLAGS="%{optflags} -fno-strict-aliasing" install
88 popd
90 PKG_CONFIG_PATH="$RESULT_DIR/usr/%{_lib}/pkgconfig:$PKG_CONFIG_PATH" ; export PKG_CONFIG_PATH ;
91 %endif
93 %configure \
94 %{_with_screen} \
95 %{?_with_glib_static} \
96 --enable-charset \
97 --enable-vfs-smb \
98 --without-x \
99 --with-gpm-mouse \
100 --disable-doxygen-doc
102 %{__make} %{?_smp_mflags} CFLAGS="%{optflags}"
104 %install
105 rm -rf $RPM_BUILD_ROOT
107 make install DESTDIR="$RPM_BUILD_ROOT"
109 install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
110 install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
112 %find_lang %{name}
114 %clean
115 rm -rf $RPM_BUILD_ROOT
117 %files -f %{name}.lang
118 %defattr(-, root, root)
120 %doc doc/FAQ doc/COPYING doc/NEWS doc/README
121 %{_bindir}/mc
122 %{_bindir}/mcedit
123 %{_bindir}/mcview
124 %{_bindir}/mcdiff
126 %dir %{_libexecdir}/mc
127 %dir %{_libexecdir}/mc/extfs.d
128 %dir %{_libexecdir}/mc/fish
129 %attr(4511, vcsa, tty) %{_libexecdir}/mc/cons.saver
130 %{_libexecdir}/mc/mc*sh
131 %{_libexecdir}/mc/extfs.d/*
132 %{_libexecdir}/mc/fish/*
134 %{_mandir}/man1/*
135 %lang(es) %{_mandir}/es/man1/mc.1*
136 %lang(hu) %{_mandir}/hu/man1/mc.1*
137 %lang(it) %{_mandir}/it/man1/mc.1*
138 %lang(pl) %{_mandir}/pl/man1/mc.1*
139 %lang(ru) %{_mandir}/ru/man1/mc.1*
140 %lang(sr) %{_mandir}/sr/man1/mc.1*
142 %{_sysconfdir}/profile.d/*
144 %config(noreplace) %{_sysconfdir}/mc/filehighlight.ini
145 %config(noreplace) %{_sysconfdir}/mc/*edit*
146 %config(noreplace) %{_sysconfdir}/mc/mc.ext
147 %config(noreplace) %{_sysconfdir}/mc/mc.menu
148 %config(noreplace) %{_sysconfdir}/mc/mc.menu.*
149 %config(noreplace) %{_sysconfdir}/mc/sfs.ini
150 %config(noreplace) %{_sysconfdir}/mc/mc.keymap
151 %config(noreplace) %{_sysconfdir}/mc/mc.keymap.*
153 %dir %{_datadir}/mc
154 %{_datadir}/mc/*
156 %changelog
158 * Fri Oct 14 2011 Slava Zanko <slavazanko@gmail.com>
159 - Changed License version
161 * Thu Jul 14 2011 Slava Zanko <slavazanko@gmail.com>
162 - Added %{_libexecdir}/mc/fish directory to spec file
164 * Thu Sep 16 2010 Andrew Borodin <aborodin@vmail.ru>
165 - Some files are installed now into %%{_datadir}/mc instead of %%{_sysconfdir}/mc.
167 * Wed Apr 28 2010 Yury V. Zaytsev <yury@shurup.com>
168 - Added mcdiff to the list of packaged files.
170 * Tue Feb 09 2010 Andrew Borodin <aborodin@vmail.ru>
171 - Fixed file list because of EXTFS VFS reorganizing.
173 * Wed Dec 30 2009 Yury V. Zaytsev <yury@shurup.com>
174 - Bumped the epoch again and changed the versioning scheme.
175 - Thanks to Slava Zanko for all his hard work on m4 vodoo!
177 * Fri Dec 25 2009 Yury V. Zaytsev <yury@shurup.com>
178 - Had to bump the epoch because of the braindead versioning scheme used.
180 * Fri Nov 27 2009 Yury V. Zaytsev <yury@shurup.com>
181 - Fixed debug info generation for legacy distros.
182 - Rewritten and simplified static build procedure.
184 * Mon Oct 26 2009 Andrew Borodin <aborodin@vmail.ru>
185 - Added new %%{_sysconfdir}/mc/mc.keymap.* files.
187 * Fri Sep 04 2009 Slava Zanko <slavazanko@gmail.com>
188 - Add new file %%{_sysconfdir}/mc/filehighlight.ini.
190 * Sat Aug 01 2009 Yury V. Zaytsev <yury@shurup.com>
191 - Fixed EL4 (and supposedly EL3) builds.
192 - Fixed some of the rpmlint warnings.
194 * Sat Jul 04 2009 Yury V. Zaytsev <yury@shurup.com>
195 - Fix the issue when wrappers were left unpackaged.
197 * Thu May 21 2009 Slava Zanko <slavazanko@gmail.com>
198 - Fix install patches: use %%{_sysconfdir}/mc directory.
200 * Fri May 8 2009 Slava Zanko <slavazanko@gmail.com>
201 - Reviewed spec-file to build on the current distributions.
202 - Changed build rules.
203 - Fixed install paths.
205 * Fri Jun 22 2007 Pavel Roskin <proski@gnu.org>
206 - Made cons.saver suid vcsa, it's needed for Fedora 7.
208 * Thu Dec 21 2006 Pavel Roskin <proski@gnu.org>
209 - Don't rely on brace expansion, it may be disabled.
211 * Mon Jan 30 2006 Pavel Roskin <proski@gnu.org>
212 - Avoid using %%{_prefix} where more specialized macros are available.
214 * Tue Aug 02 2005 Pavel Roskin <proski@gnu.org>
215 - Replace obsolete "Copyright" with "License".
217 * Thu Mar 31 2005 Pavel Roskin <proski@gnu.org>
218 - Comment out build dependencies - they are too distribution specific.
220 * Tue Sep 23 2003 Pavel Roskin <proski@gnu.org>
221 - Remove term directory, it's obsolete and irrelevant on modern systems.
222 - Include translated menu files.
224 * Sun Feb 16 2003 Pavel Roskin <proski@gnu.org>
225 - Remove obsolete dependency on /sbin/chkconfig.
227 * Tue Dec 24 2002 Pavel Roskin <proski@gnu.org>
228 - Work around bug in rpm 4.1 that expands defines in comments.
229 - Handle --without-x.
231 * Mon Nov 04 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
232 - Handle --with ext2undel.
234 * Fri Nov 01 2002 Pavel Roskin <proski@gnu.org>
235 - Add wrappers to support setting last directory on exit. Keep all
236 scripts in their original directory, just copy them.
238 * Tue Oct 22 2002 Pavel Roskin <proski@gnu.org>
239 - Don't use the included S-Lang, there is a workaround for Red Hat 8.0
240 S-Lang, and binary compatibility with Red Hat 7.x doesn't work anyway.
242 * Tue Oct 08 2002 Pavel Roskin <proski@gnu.org>
243 - Use the included S-Lang again, since we include a better version now.
244 This should avoid incompatibility with Red Hat 7.x.
245 - Add _with_glib2 option.
247 * Mon Oct 07 2002 Pavel Roskin <proski@gnu.org>
248 - Remove installed mc.sh and mc.csh from %%{_prefix}/share/mc/bin to
249 suppress a warning about installed but unpackaged files.
251 * Mon Sep 30 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
252 - Don't require slang-devel if _with_ncurses.
253 - Handle --with samba.
255 * Sun Sep 29 2002 Pavel Roskin <proski@gnu.org>
256 - Use --with-screen instead of --with-ncurses and --with-included-slang.
258 * Mon Sep 23 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
259 - Restore %%config for %%{_prefix}/share/mc/mc.charsets.
260 - Restore %%{_prefix}/share/mc/edit.spell.rc.
262 * Sat Sep 21 2002 Pavel Roskin <proski@gnu.org>
263 - Use FHS-compliant paths.
264 - Drop %%config from files under /usr/share - users are not supposed to
265 edit them. Local copies under ~/.mc should be used for that.
267 * Wed Aug 21 2002 Pavel Roskin <proski@gnu.org>
268 - Change description, update URLs, allow dash in the version.
270 * Tue Aug 20 2002 Pavel Roskin <proski@gnu.org>
271 - Support conditional builds.
273 * Tue Aug 20 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
274 - Add /usr/lib/mc/mc.charsets.
275 - Add %%{_mandir}/*/man1/*.
277 * Fri Aug 16 2002 Pavel Roskin <proski@gnu.org>
278 - Remove mc.global.
280 * Mon Jan 21 2002 Pavel Roskin <proski@gnu.org>
281 - Remove --with-gnome and --with-included-slang from configure options.
282 - Add BuildPrereq.
284 * Fri Aug 24 2001 Pavel Roskin <proski@gnu.org>
285 - Remove gmc. Reunite mc and mc-common.
287 * Sun Aug 05 2001 Pavel Roskin <proski@gnu.org>
288 - Set epoch.
290 * Sun Jul 15 2001 Pavel Roskin <proski@gnu.org>
291 - Remove /usr/lib/mc/layout.
293 * Sat Jun 09 2001 Pavel Roskin <proski@gnu.org>
294 - Use %%{_prefix} and %%{_mandir}. Specify --mandir to configure.
296 * Fri May 25 2001 Pavel Roskin <proski@gnu.org>
297 - Change groups. Don't include locale directories. More config files.
299 * Sun May 20 2001 Pavel Roskin <proski@gnu.org>
300 - Don't require stylesheets, since HTML files are now in the tarball.
302 * Thu Apr 19 2001 Pavel Roskin <proski@gnu.org>
303 - Remove package mcserv. Drop dependency on PAM.
305 * Mon Feb 26 2001 Pavel Roskin <proski@gnu.org>
306 - Remove mc-gnome.ext.
308 * Thu Jan 11 2001 Pavel Roskin <proski@gnu.org>
309 - Include mcview.
311 * Mon Oct 23 2000 Pavel Roskin <proski@gnu.org>
312 - Allow mcserv.8 to be gzipped.
314 * Sat Sep 30 2000 Pavel Roskin <proski@gnu.org>
315 - New package mc-common.
316 - Use DESTDIR instead of misusing prefix.
317 - Don't install old icons - they don't exist
319 * Sat Sep 23 2000 Pavel Roskin <proski@gnu.org>
320 - Include translations with mc, not gmc.
321 - chkconfig --del in %%preun, not %%postun.
322 - --without-debug not needed.
323 - /etc/X11/wmconfig not needed.
324 - /etc/pam.d/mcserv shouldn't be executable.
325 - New files in %%{prefix}/lib/mc/ - translated hints, editor files.
327 * Thu Sep 09 1999 Elliot Lee <sopwith@redhat.com>
328 - Include .idl files in the package.
330 * Sat Sep 04 1999 Gregory McLean <gregm@comstar.net>
331 - Added a build prereq so that rpms get built with documentation ;)
333 * Mon Jul 12 1999 Kjartan Maraas <kmaraas@online.no>
334 - Added help and locale files to %%files.
336 * Tue Jun 22 1999 Vladimir Kondratiev <vkondra@iil.intel.com>
337 - Added syntax files to %%files.
339 * Wed May 26 1999 Cody Russell <bratsche@dfw.net>
340 - Chmod cons.saver at $RPM_BUILD_ROOT%%{prefix}/lib rather than at
341 $RPM_BUILD_ROOT/usr/lib. We can now install to somewhere other than /usr.
343 * Sun Apr 18 1999 Gregory McLean <gregm@comstar.net>
344 - Updated the specfile, removed some kludges.
346 * Thu Aug 20 1998 Michael Fulbright <msf@redhat.com>
347 - Rebuilt against gnome-libs 0.27 and gtk+-1.1.
349 * Thu Jul 09 1998 Michael Fulbright <msf@redhat.com>
350 - Made cons.saver not setuid.
352 * Sun Apr 19 1998 Marc Ewing <marc@redhat.com>
353 - Removed tkmc.
355 * Wed Apr 8 1998 Marc Ewing <marc@redhat.com>
356 - Add /usr/lib/mc/layout to gmc.