Ticket #1426: txt

File txt, 9.5 KB (added by zaytsev, 15 years ago)

mc.spec.in

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