mc.spec.in 10 KB

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