diff --git a/Makefile.am b/Makefile.am index e68ee6ed3..cde8ec0d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,11 +2,10 @@ AUTOMAKE_OPTIONS = 1.5 -SUBDIRS = intl po vfs edit src lib doc syntax contrib +SUBDIRS = intl po vfs edit src doc syntax contrib EXTRA_DIST = -noinst_DATA = mc.spec mc.qpg pkginfo prototype dist_noinst_SCRIPTS = build-glib2.sh ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index 9301a749b..30e562dc7 100644 --- a/configure.ac +++ b/configure.ac @@ -553,20 +553,21 @@ AC_CONFIG_FILES([ Makefile contrib/Makefile -contrib/dist/Makefile -contrib/dist/mc.spec +contrib/dist/Makefile +contrib/dist/debian/Makefile +contrib/dist/gentoo/Makefile +contrib/dist/redhat/Makefile +contrib/dist/redhat/mc.spec contrib/dist/mc.qpg contrib/dist/pkginfo contrib/dist/prototype - -lib/Makefile +contrib/mc.ext src/Makefile src/search/Makefile edit/Makefile syntax/Makefile -lib/mc.ext vfs/Makefile vfs/extfs/Makefile diff --git a/lib/.gitignore b/contrib/.gitignore similarity index 100% rename from lib/.gitignore rename to contrib/.gitignore diff --git a/lib/ChangeLog b/contrib/ChangeLog similarity index 100% rename from lib/ChangeLog rename to contrib/ChangeLog diff --git a/contrib/Makefile.am b/contrib/Makefile.am index d18c40af2..6f5350dfa 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -1,3 +1,47 @@ ## Process this file with automake to create Makefile.in. SUBDIRS = dist + +suppbindir = $(pkgdatadir)/bin + +if CHARSET +LIBFILES_ADD = mc.charsets +else +LIBFILES_ADD = +endif + +LIBFILES_OUT = mc.ext + +LIBFILES_CONST = mc.lib mc.menu mc.menu.sr cedit.menu edit.indent.rc \ + edit.spell.rc + +noinst_DATA = README.xterm mcserv.init mcserv.pamd xterm.ad + +SCRIPTS_IN = mc.csh.in mc.sh.in mc-wrapper.csh.in mc-wrapper.sh.in +SCRIPTS_OUT = mc.csh mc.sh mc-wrapper.csh mc-wrapper.sh + +suppbin_SCRIPTS = $(SCRIPTS_OUT) + +pkgdata_DATA = $(LIBFILES_CONST) $(LIBFILES_ADD) $(LIBFILES_OUT) + +CLEANFILES = $(SCRIPTS_OUT) + +# Files processed by configure don't need to be here +EXTRA_DIST = \ + $(LIBFILES_CONST) \ + $(SCRIPTS_IN) \ + $(noinst_DATA) \ + mc.charsets + +mc.csh: $(srcdir)/mc.csh.in + sed "s%@""suppbindir@%$(suppbindir)%" $(srcdir)/mc.csh.in > mc.csh + +mc.sh: $(srcdir)/mc.sh.in + sed "s%@""suppbindir@%$(suppbindir)%" $(srcdir)/mc.sh.in > mc.sh + +mc-wrapper.csh: $(srcdir)/mc-wrapper.csh.in + sed "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.csh.in > mc-wrapper.csh + +mc-wrapper.sh: $(srcdir)/mc-wrapper.sh.in + sed "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.sh.in > mc-wrapper.sh + diff --git a/lib/README.xterm b/contrib/README.xterm similarity index 100% rename from lib/README.xterm rename to contrib/README.xterm diff --git a/lib/cedit.menu b/contrib/cedit.menu similarity index 100% rename from lib/cedit.menu rename to contrib/cedit.menu diff --git a/contrib/dist/Makefile.am b/contrib/dist/Makefile.am index 6417c4d42..822e6b2ba 100644 --- a/contrib/dist/Makefile.am +++ b/contrib/dist/Makefile.am @@ -1,9 +1,11 @@ +SUBDIRS = debian gentoo redhat + AUTOMAKE_OPTIONS = 1.5 -EXTRA_DIST = pkginfo.in prototype.in mc.qpg.in mc.spec.in +EXTRA_DIST = pkginfo.in prototype.in mc.qpg.in -noinst_DATA = mc.spec mc.qpg pkginfo prototype +noinst_DATA = mc.qpg pkginfo prototype ACLOCAL_AMFLAGS = -I m4 diff --git a/contrib/dist/debian/Makefile.am b/contrib/dist/debian/Makefile.am new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/contrib/dist/debian/Makefile.am @@ -0,0 +1 @@ + diff --git a/contrib/dist/gentoo/Makefile.am b/contrib/dist/gentoo/Makefile.am new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/contrib/dist/gentoo/Makefile.am @@ -0,0 +1 @@ + diff --git a/contrib/dist/redhat/Makefile.am b/contrib/dist/redhat/Makefile.am new file mode 100644 index 000000000..d4426f3e1 --- /dev/null +++ b/contrib/dist/redhat/Makefile.am @@ -0,0 +1,3 @@ +EXTRA_DIST = mc.spec.in + +noinst_DATA = mc.spec diff --git a/contrib/dist/mc.spec.in b/contrib/dist/redhat/mc.spec.in similarity index 83% rename from contrib/dist/mc.spec.in rename to contrib/dist/redhat/mc.spec.in index fe21a7e09..b53a26b62 100644 --- a/contrib/dist/mc.spec.in +++ b/contrib/dist/redhat/mc.spec.in @@ -10,23 +10,19 @@ %define ver @VERSION@ %define rpmver @RPM_VERSION@ %define RELEASE 1 -%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} +%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}%{?dist} -Summary: Midnight Commander visual shell +Summary: User-friendly text console file manager and visual shell Name: mc Version: %rpmver -Release: %rel +Release: %rel%{?dist} Epoch: 1 -License: GPL/LGPL -Group: Applications/File -Source0: ftp://ftp.gnu.org/gnu/mc/mc-%{ver}.tar.gz +License: GPLv2 +Group: System Environment/Shells +Source0: mc-%{ver}.tar.gz URL: http://www.midnight-commander.org/ -BuildRoot: /var/tmp/mc-%{PACKAGE_VERSION}-root - -# Names of those packages are distribution specific -#BuildRequires: glib-devel -#%{!?_with_ncurses:BuildRequires: slang-devel} -#%{?_with_ncurses:BuildRequires: ncurses-devel} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: glib2-devel e2fsprogs-devel slang-devel %description GNU Midnight Commander is a visual file manager. It's a feature rich @@ -35,69 +31,63 @@ delete files and whole directory trees, search for files and run commands in the subshell. Internal viewer and editor are included. Mouse is supported under X Window System and on Linux console. VFS (Virtual Filesystem) allows you to view archives and files on remote -servers. +servers (via SAMBA, FTP or SSH). %prep %setup -q -n mc-%{ver} %build -CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \ - --prefix=%{_prefix} \ - --mandir=%{_mandir} \ -%{?_with_ncurses: --with-screen=ncurses} \ -%{?_with_charset: --enable-charset} \ -%{?_with_samba: --with-samba} \ -%{?_with_ext2undel: --with-ext2undel} \ -%{?_without_x: --without-x} - -make +%configure \ + --with-screen=slang \ + --enable-charset \ + --with-samba \ + --with-x \ + --with-gpm-mouse +make %{?_smp_mflags} %install -echo $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d -cp -f $RPM_BUILD_ROOT/%{_datadir}/mc/bin/mc.*sh \ - $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d +make install DESTDIR=$RPM_BUILD_ROOT + +install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d +install contrib/{mc.sh,mc.csh} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d + +%find_lang %{name} %clean rm -rf $RPM_BUILD_ROOT -%files +%files -f %{name}.lang %defattr(-, root, root) -%doc FAQ COPYING NEWS README +%doc doc/FAQ COPYING doc/NEWS doc/README %{_bindir}/mc %{_bindir}/mcedit %{_bindir}/mcview %{_bindir}/mcmfmt %attr(4755, vcsa, tty) %{_libexecdir}/mc/cons.saver %{_mandir}/man1/* -%{_mandir}/*/man1/* +%lang(es) %{_mandir}/es/man1/mc.1* +%lang(hu) %{_mandir}/hu/man1/mc.1* +%lang(it) %{_mandir}/it/man1/mc.1* +%lang(pl) %{_mandir}/pl/man1/mc.1* +%lang(ru) %{_mandir}/ru/man1/mc.1* +%lang(sr) %{_mandir}/sr/man1/mc.1* -%config %{_sysconfdir}/profile.d/* -%{_datadir}/mc/cedit.menu -%{_datadir}/mc/edit.indent.rc -%{_datadir}/mc/edit.spell.rc -%{_datadir}/mc/bin/* -%{_datadir}/mc/extfs/* -%{_datadir}/mc/mc.ext -%{_datadir}/mc/mc.lib -%{_datadir}/mc/mc.menu* -%{?_with_charset:%config %{_datadir}/mc/mc.charsets} +%{_sysconfdir}/profile.d/* -%{_datadir}/mc/mc.hint* -%{_datadir}/mc/mc.hlp* -%{_datadir}/mc/syntax/* -%{_datadir}/locale/*/LC_MESSAGES/* +%dir %{_datadir}/mc +%{_datadir}/mc/* %dir %{_libexecdir}/mc -%dir %{_datadir}/mc -%dir %{_datadir}/mc/extfs -%dir %{_datadir}/mc/syntax %changelog +* Fri May 8 2009 Slava Zanko +- Review spec-file to build on the current distributions +- Change build rules +- Fix install pathes + * Fri Jun 22 2007 Pavel Roskin - Make cons.saver suid vcsa, it's needed for Fedora 7 diff --git a/lib/edit.indent.rc b/contrib/edit.indent.rc similarity index 100% rename from lib/edit.indent.rc rename to contrib/edit.indent.rc diff --git a/lib/edit.spell.rc b/contrib/edit.spell.rc similarity index 100% rename from lib/edit.spell.rc rename to contrib/edit.spell.rc diff --git a/lib/mc-wrapper.csh.in b/contrib/mc-wrapper.csh.in similarity index 100% rename from lib/mc-wrapper.csh.in rename to contrib/mc-wrapper.csh.in diff --git a/lib/mc-wrapper.sh.in b/contrib/mc-wrapper.sh.in similarity index 100% rename from lib/mc-wrapper.sh.in rename to contrib/mc-wrapper.sh.in diff --git a/lib/mc.charsets b/contrib/mc.charsets similarity index 100% rename from lib/mc.charsets rename to contrib/mc.charsets diff --git a/lib/mc.csh.in b/contrib/mc.csh.in similarity index 100% rename from lib/mc.csh.in rename to contrib/mc.csh.in diff --git a/lib/mc.ext.in b/contrib/mc.ext.in similarity index 100% rename from lib/mc.ext.in rename to contrib/mc.ext.in diff --git a/lib/mc.lib b/contrib/mc.lib similarity index 100% rename from lib/mc.lib rename to contrib/mc.lib diff --git a/lib/mc.menu b/contrib/mc.menu similarity index 100% rename from lib/mc.menu rename to contrib/mc.menu diff --git a/lib/mc.menu.sr b/contrib/mc.menu.sr similarity index 100% rename from lib/mc.menu.sr rename to contrib/mc.menu.sr diff --git a/lib/mc.sh.in b/contrib/mc.sh.in similarity index 100% rename from lib/mc.sh.in rename to contrib/mc.sh.in diff --git a/lib/mcserv.init b/contrib/mcserv.init similarity index 100% rename from lib/mcserv.init rename to contrib/mcserv.init diff --git a/lib/mcserv.pamd b/contrib/mcserv.pamd similarity index 100% rename from lib/mcserv.pamd rename to contrib/mcserv.pamd diff --git a/lib/xterm.ad b/contrib/xterm.ad similarity index 100% rename from lib/xterm.ad rename to contrib/xterm.ad diff --git a/doc/Makefile.am b/doc/Makefile.am index 0260a6993..b3b3928b4 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -6,7 +6,7 @@ pkgdata_DATA = mc.hlp EXTRA_DIST = xnc.hlp $(DX_CONFIG) doc/devel doxygen-include.am CLEANFILES = $(pkgdata_DATA) -mc.hlp: mc.1 $(srcdir)/xnc.hlp $(top_builddir)/src/man2hlp +mc.hlp: man/mc.1 $(srcdir)/xnc.hlp $(top_builddir)/src/man2hlp - $(top_builddir)/src/man2hlp man/mc.1 $(srcdir)/xnc.hlp mc.hlp include doxygen-include.am diff --git a/lib/Makefile.am b/lib/Makefile.am deleted file mode 100644 index b43be9972..000000000 --- a/lib/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -suppbindir = $(pkgdatadir)/bin - -if CHARSET -LIBFILES_ADD = mc.charsets -else -LIBFILES_ADD = -endif - -LIBFILES_OUT = mc.ext - -LIBFILES_CONST = mc.lib mc.menu mc.menu.sr cedit.menu edit.indent.rc \ - edit.spell.rc - -noinst_DATA = README.xterm mcserv.init mcserv.pamd xterm.ad - -SCRIPTS_IN = mc.csh.in mc.sh.in mc-wrapper.csh.in mc-wrapper.sh.in -SCRIPTS_OUT = mc.csh mc.sh mc-wrapper.csh mc-wrapper.sh - -suppbin_SCRIPTS = $(SCRIPTS_OUT) - -pkgdata_DATA = $(LIBFILES_CONST) $(LIBFILES_ADD) $(LIBFILES_OUT) - -CLEANFILES = $(SCRIPTS_OUT) - -# Files processed by configure don't need to be here -EXTRA_DIST = \ - $(LIBFILES_CONST) \ - $(SCRIPTS_IN) \ - $(noinst_DATA) \ - mc.charsets - -mc.csh: $(srcdir)/mc.csh.in - sed "s%@""suppbindir@%$(suppbindir)%" $(srcdir)/mc.csh.in > mc.csh - -mc.sh: $(srcdir)/mc.sh.in - sed "s%@""suppbindir@%$(suppbindir)%" $(srcdir)/mc.sh.in > mc.sh - -mc-wrapper.csh: $(srcdir)/mc-wrapper.csh.in - sed "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.csh.in > mc-wrapper.csh - -mc-wrapper.sh: $(srcdir)/mc-wrapper.sh.in - sed "s%@""bindir@%$(bindir)%" $(srcdir)/mc-wrapper.sh.in > mc-wrapper.sh -