mc.spec.in 11 KB

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