mc.spec.in 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  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. --enable-vfs-smb \
  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}/mcdiff
  92. %dir %{_libexecdir}/mc
  93. %dir %{_libexecdir}/mc/extfs.d
  94. %dir %{_libexecdir}/mc/fish
  95. %attr(4511, vcsa, tty) %{_libexecdir}/mc/cons.saver
  96. %{_libexecdir}/mc/mc*sh
  97. %{_libexecdir}/mc/extfs.d/*
  98. %{_libexecdir}/mc/fish/*
  99. %{_mandir}/man1/*
  100. %lang(es) %{_mandir}/es/man1/mc.1*
  101. %lang(hu) %{_mandir}/hu/man1/mc.1*
  102. %lang(it) %{_mandir}/it/man1/mc.1*
  103. %lang(pl) %{_mandir}/pl/man1/mc.1*
  104. %lang(ru) %{_mandir}/ru/man1/mc.1*
  105. %lang(sr) %{_mandir}/sr/man1/mc.1*
  106. %{_sysconfdir}/profile.d/*
  107. %config(noreplace) %{_sysconfdir}/mc/filehighlight.ini
  108. %config(noreplace) %{_sysconfdir}/mc/*edit*
  109. %config(noreplace) %{_sysconfdir}/mc/mc.ext
  110. %config(noreplace) %{_sysconfdir}/mc/mc.menu
  111. %config(noreplace) %{_sysconfdir}/mc/mc.menu.*
  112. %config(noreplace) %{_sysconfdir}/mc/sfs.ini
  113. %config(noreplace) %{_sysconfdir}/mc/mc.keymap
  114. %config(noreplace) %{_sysconfdir}/mc/mc.keymap.*
  115. %dir %{_datadir}/mc
  116. %{_datadir}/mc/*
  117. %changelog
  118. * Thu Jul 14 2011 Slava Zanko <slavazanko@gmail.com>
  119. - Added %{_libexecdir}/mc/fish directory to spec file
  120. * Thu Sep 16 2010 Andrew Borodin <aborodin@vmail.ru>
  121. - Some files are installed now into %%{_datadir}/mc instead of %%{_sysconfdir}/mc.
  122. * Wed Apr 28 2010 Yury V. Zaytsev <yury@shurup.com>
  123. - Added mcdiff to the list of packaged files.
  124. * Tue Feb 09 2010 Andrew Borodin <aborodin@vmail.ru>
  125. - Fixed file list because of EXTFS VFS reorganizing.
  126. * Wed Dec 30 2009 Yury V. Zaytsev <yury@shurup.com>
  127. - Bumped the epoch again and changed the versioning scheme.
  128. - Thanks to Slava Zanko for all his hard work on m4 vodoo!
  129. * Fri Dec 25 2009 Yury V. Zaytsev <yury@shurup.com>
  130. - Had to bump the epoch because of the braindead versioning scheme used.
  131. * Fri Nov 27 2009 Yury V. Zaytsev <yury@shurup.com>
  132. - Fixed debug info generation for legacy distros.
  133. - Rewritten and simplified static build procedure.
  134. * Mon Oct 26 2009 Andrew Borodin <aborodin@vmail.ru>
  135. - Added new %%{_sysconfdir}/mc/mc.keymap.* files.
  136. * Fri Sep 04 2009 Slava Zanko <slavazanko@gmail.com>
  137. - Add new file %%{_sysconfdir}/mc/filehighlight.ini.
  138. * Sat Aug 01 2009 Yury V. Zaytsev <yury@shurup.com>
  139. - Fixed EL4 (and supposedly EL3) builds.
  140. - Fixed some of the rpmlint warnings.
  141. * Sat Jul 04 2009 Yury V. Zaytsev <yury@shurup.com>
  142. - Fix the issue when wrappers were left unpackaged.
  143. * Thu May 21 2009 Slava Zanko <slavazanko@gmail.com>
  144. - Fix install patches: use %%{_sysconfdir}/mc directory.
  145. * Fri May 8 2009 Slava Zanko <slavazanko@gmail.com>
  146. - Reviewed spec-file to build on the current distributions.
  147. - Changed build rules.
  148. - Fixed install paths.
  149. * Fri Jun 22 2007 Pavel Roskin <proski@gnu.org>
  150. - Made cons.saver suid vcsa, it's needed for Fedora 7.
  151. * Thu Dec 21 2006 Pavel Roskin <proski@gnu.org>
  152. - Don't rely on brace expansion, it may be disabled.
  153. * Mon Jan 30 2006 Pavel Roskin <proski@gnu.org>
  154. - Avoid using %%{_prefix} where more specialized macros are available.
  155. * Tue Aug 02 2005 Pavel Roskin <proski@gnu.org>
  156. - Replace obsolete "Copyright" with "License".
  157. * Thu Mar 31 2005 Pavel Roskin <proski@gnu.org>
  158. - Comment out build dependencies - they are too distribution specific.
  159. * Tue Sep 23 2003 Pavel Roskin <proski@gnu.org>
  160. - Remove term directory, it's obsolete and irrelevant on modern systems.
  161. - Include translated menu files.
  162. * Sun Feb 16 2003 Pavel Roskin <proski@gnu.org>
  163. - Remove obsolete dependency on /sbin/chkconfig.
  164. * Tue Dec 24 2002 Pavel Roskin <proski@gnu.org>
  165. - Work around bug in rpm 4.1 that expands defines in comments.
  166. - Handle --without-x.
  167. * Mon Nov 04 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
  168. - Handle --with ext2undel.
  169. * Fri Nov 01 2002 Pavel Roskin <proski@gnu.org>
  170. - Add wrappers to support setting last directory on exit. Keep all
  171. scripts in their original directory, just copy them.
  172. * Tue Oct 22 2002 Pavel Roskin <proski@gnu.org>
  173. - Don't use the included S-Lang, there is a workaround for Red Hat 8.0
  174. S-Lang, and binary compatibility with Red Hat 7.x doesn't work anyway.
  175. * Tue Oct 08 2002 Pavel Roskin <proski@gnu.org>
  176. - Use the included S-Lang again, since we include a better version now.
  177. This should avoid incompatibility with Red Hat 7.x.
  178. - Add _with_glib2 option.
  179. * Mon Oct 07 2002 Pavel Roskin <proski@gnu.org>
  180. - Remove installed mc.sh and mc.csh from %%{_prefix}/share/mc/bin to
  181. suppress a warning about installed but unpackaged files.
  182. * Mon Sep 30 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
  183. - Don't require slang-devel if _with_ncurses.
  184. - Handle --with samba.
  185. * Sun Sep 29 2002 Pavel Roskin <proski@gnu.org>
  186. - Use --with-screen instead of --with-ncurses and --with-included-slang.
  187. * Mon Sep 23 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
  188. - Restore %%config for %%{_prefix}/share/mc/mc.charsets.
  189. - Restore %%{_prefix}/share/mc/edit.spell.rc.
  190. * Sat Sep 21 2002 Pavel Roskin <proski@gnu.org>
  191. - Use FHS-compliant paths.
  192. - Drop %%config from files under /usr/share - users are not supposed to
  193. edit them. Local copies under ~/.mc should be used for that.
  194. * Wed Aug 21 2002 Pavel Roskin <proski@gnu.org>
  195. - Change description, update URLs, allow dash in the version.
  196. * Tue Aug 20 2002 Pavel Roskin <proski@gnu.org>
  197. - Support conditional builds.
  198. * Tue Aug 20 2002 Andrew V. Samoilov <sav@bcs.zp.ua>
  199. - Add /usr/lib/mc/mc.charsets.
  200. - Add %%{_mandir}/*/man1/*.
  201. * Fri Aug 16 2002 Pavel Roskin <proski@gnu.org>
  202. - Remove mc.global.
  203. * Mon Jan 21 2002 Pavel Roskin <proski@gnu.org>
  204. - Remove --with-gnome and --with-included-slang from configure options.
  205. - Add BuildPrereq.
  206. * Fri Aug 24 2001 Pavel Roskin <proski@gnu.org>
  207. - Remove gmc. Reunite mc and mc-common.
  208. * Sun Aug 05 2001 Pavel Roskin <proski@gnu.org>
  209. - Set epoch.
  210. * Sun Jul 15 2001 Pavel Roskin <proski@gnu.org>
  211. - Remove /usr/lib/mc/layout.
  212. * Sat Jun 09 2001 Pavel Roskin <proski@gnu.org>
  213. - Use %%{_prefix} and %%{_mandir}. Specify --mandir to configure.
  214. * Fri May 25 2001 Pavel Roskin <proski@gnu.org>
  215. - Change groups. Don't include locale directories. More config files.
  216. * Sun May 20 2001 Pavel Roskin <proski@gnu.org>
  217. - Don't require stylesheets, since HTML files are now in the tarball.
  218. * Thu Apr 19 2001 Pavel Roskin <proski@gnu.org>
  219. - Remove package mcserv. Drop dependency on PAM.
  220. * Mon Feb 26 2001 Pavel Roskin <proski@gnu.org>
  221. - Remove mc-gnome.ext.
  222. * Thu Jan 11 2001 Pavel Roskin <proski@gnu.org>
  223. - Include mcview.
  224. * Mon Oct 23 2000 Pavel Roskin <proski@gnu.org>
  225. - Allow mcserv.8 to be gzipped.
  226. * Sat Sep 30 2000 Pavel Roskin <proski@gnu.org>
  227. - New package mc-common.
  228. - Use DESTDIR instead of misusing prefix.
  229. - Don't install old icons - they don't exist
  230. * Sat Sep 23 2000 Pavel Roskin <proski@gnu.org>
  231. - Include translations with mc, not gmc.
  232. - chkconfig --del in %%preun, not %%postun.
  233. - --without-debug not needed.
  234. - /etc/X11/wmconfig not needed.
  235. - /etc/pam.d/mcserv shouldn't be executable.
  236. - New files in %%{prefix}/lib/mc/ - translated hints, editor files.
  237. * Thu Sep 09 1999 Elliot Lee <sopwith@redhat.com>
  238. - Include .idl files in the package.
  239. * Sat Sep 04 1999 Gregory McLean <gregm@comstar.net>
  240. - Added a build prereq so that rpms get built with documentation ;)
  241. * Mon Jul 12 1999 Kjartan Maraas <kmaraas@online.no>
  242. - Added help and locale files to %%files.
  243. * Tue Jun 22 1999 Vladimir Kondratiev <vkondra@iil.intel.com>
  244. - Added syntax files to %%files.
  245. * Wed May 26 1999 Cody Russell <bratsche@dfw.net>
  246. - Chmod cons.saver at $RPM_BUILD_ROOT%%{prefix}/lib rather than at
  247. $RPM_BUILD_ROOT/usr/lib. We can now install to somewhere other than /usr.
  248. * Sun Apr 18 1999 Gregory McLean <gregm@comstar.net>
  249. - Updated the specfile, removed some kludges.
  250. * Thu Aug 20 1998 Michael Fulbright <msf@redhat.com>
  251. - Rebuilt against gnome-libs 0.27 and gtk+-1.1.
  252. * Thu Jul 09 1998 Michael Fulbright <msf@redhat.com>
  253. - Made cons.saver not setuid.
  254. * Sun Apr 19 1998 Marc Ewing <marc@redhat.com>
  255. - Removed tkmc.
  256. * Wed Apr 8 1998 Marc Ewing <marc@redhat.com>
  257. - Add /usr/lib/mc/layout to gmc.