mc.spec.in 9.5 KB

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