SPECS: mol.spec - merged from DEVEL
sparky
sparky at pld-linux.org
Thu Nov 16 22:16:30 CET 2006
Author: sparky Date: Thu Nov 16 21:16:30 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- merged from DEVEL
---- Files affected:
SPECS:
mol.spec (1.40 -> 1.41)
---- Diffs:
================================================================
Index: SPECS/mol.spec
diff -u SPECS/mol.spec:1.40 SPECS/mol.spec:1.41
--- SPECS/mol.spec:1.40 Mon Nov 6 17:04:12 2006
+++ SPECS/mol.spec Thu Nov 16 22:16:25 2006
@@ -1,8 +1,6 @@
# $Revision$, $Date$
#
# TODO:
-# - building without userspace (make in userspace is preparing files
-# for module building)
# - scripts should search for modules in /lib/moduiles
#
# Conditional build:
@@ -10,52 +8,51 @@
%bcond_without kernel # don't build kernel modules
%bcond_without smp # don't build SMP module
%bcond_with verbose # verbose build (V=1)
-#%%bcond_without userspace # don't build userspace tools
+%bcond_without userspace # don't build userspace tools
%bcond_with minimal # no X, no sound
%bcond_without debugger # no debugger
-%define _rel 0.1
+%{?debug:%define with_debugger 1}
+
+%define _basever 0.9.71
+%define _minor .1
+%define _rel 0.9
Summary: Runs MacOS natively on Linux/ppc
Summary(ja): Mac On Linux - Linux/ppc žĺ¤Î MacOS ĽÍĽ¤ĽĆĽŁĽÖźÂšÔ´Äś
Summary(pl): Natywne uruchamianie MacOS na Linux/ppc
Name: mol
-Version: 0.9.70
+Version: %{_basever}%{_minor}
Release: %{_rel}
License: GPL
Group: Applications/Emulators
-Source0: http://www.maconlinux.org/downloads/%{name}-%{version}.tgz
-# Source0-md5: bfdd0bd6ae01018b5c46f87d4ad879f1
-#Source1: mol.init
-Patch0: %{name}-modules-update.patch
-Patch1: %{name}-modules26.patch
-#Patch0: %{name}-curses.patch
-#Patch1: %{name}-configure.patch
-#Patch2: %{name}-kernel.patch
-#Patch3: %{name}-sheepnet.patch
-#Patch4: %{name}-netdriver.patch
-#Patch5: %{name}-libimport.patch
-#Patch6: %{name}-usbdev.patch
-#Patch7: %{name}-gkh.patch
-#Patch8: %{name}-gkh-compiler_h.patch
-#Patch9: %{name}-gkh-includes.patch
-Patch10: %{name}-warnings.patch
+#Source0: http://www.maconlinux.org/downloads/%{name}-%{version}.tgz
+Source0: http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/%{name}-%{version}.tar.bz2
+# Source0-md5: 3eaa51927191b03b06828609a1122307
+Patch0: %{name}-iquote.patch
+Patch1: %{name}-scripts.patch
URL: http://www.maconlinux.org/
-#BuildRequires: XFree86-devel
BuildRequires: autoconf
BuildRequires: automake
-#BuildRequires: bison
-#BuildRequires: flex
-#%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
-BuildRequires: ncurses-devel
-BuildRequires: rpmbuild(macros) >= 1.118
-Requires(post,preun): /sbin/chkconfig
+%if %{with userspace}
+BuildRequires: gcc >= 4.0
+%if !%{with minimal}
+BuildRequires: alsa-lib-devel
+BuildRequires: libpng-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
+%endif
+%{?with_debugger:BuildRequires: ncurses-devel}
+%endif
+%if %{with kernel}
+%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
+BuildRequires: rpmbuild(macros) >= 1.330
+%endif
Requires: dev >= 2.8.0-24
-Requires: kernel(mol)
ExclusiveArch: ppc
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _mol_libdir %{_libdir}/mol/%{version}
-%define _mol_datadir %{_datadir}/mol/%{version}
+%define _mol_libdir %{_libdir}/mol/%{_basever}
+%define _mol_datadir %{_datadir}/mol/%{_basever}
%define _mol_localstatedir /var/lib/mol
%description
@@ -71,221 +68,164 @@
szybkością! Obsługiwane są wszystkie wersje PowerPC MacOS-a (włącznie
z MacOSX 10.2).
-%package -n kernel%{_alt_kernel}-%{name}
+%package -n kernel%{_alt_kernel}-misc-mol
Summary: Mac-on-Linux kernel modules
Summary(pl): Moduły jądra Mac-on-Linux
Release: %{_rel}@%{_kernel_ver_str}
-Group: Applications/Emulators
+Group: Base/Kernel
Requires(post,postun): /sbin/depmod
-Provides: kernel(mol)
-#Obsoletes: kernel-mol
+%if %{with dist_kernel}
+%requires_releq_kernel_up
+Requires(postun): %releq_kernel_up
+%endif
-%description -n kernel%{_alt_kernel}-%{name}
+%description -n kernel%{_alt_kernel}-misc-mol
This package contains the Mac-on-Linux kernel module needed by MOL. It
also contains the sheep_net kernel module (for networking).
-%description -n kernel%{_alt_kernel}-%{name} -l pl
+%description -n kernel%{_alt_kernel}-misc-mol -l pl
Ten pakiet zawiera moduł jądra Mac-on-Linux potrzebny dla MOL. Zawiera
także moduł jądra sheep_net (dla sieci).
-%package -n kernel%{_alt_kernel}-smp-%{name}
+%package -n kernel%{_alt_kernel}-smp-misc-mol
Summary: Mac-on-Linux kernel modules SMP
Summary(pl): Moduły jądra Mac-on-Linux SMP
Release: %{_rel}@%{_kernel_ver_str}
-Group: Applications/Emulators
+Group: Base/Kernel
Requires(post,postun): /sbin/depmod
-Provides: kernel(mol)
-#Obsoletes: kernel-mol
+%if %{with dist_kernel}
+%requires_releq_kernel_smp
+Requires(postun): %releq_kernel_smp
+%endif
-%description -n kernel%{_alt_kernel}-smp-%{name}
+%description -n kernel%{_alt_kernel}-smp-misc-mol
This package contains the Mac-on-Linux kernel module needed by MOL. It
also contains the sheep_net kernel module (for networking). SMP
version.
-%description -n kernel%{_alt_kernel}-smp-%{name} -l pl
+%description -n kernel%{_alt_kernel}-smp-misc-mol -l pl
Ten pakiet zawiera moduł jądra Mac-on-Linux potrzebny dla MOL. Zawiera
także moduł jądra sheep_net (dla sieci). Wersja dla jąder SMP.
%prep
%setup -q
-chmod +w -R .
%patch0 -p1
%patch1 -p1
-%patch10 -p1
-sed -i 's|@KERNEL_SRC@|%{_kernelsrcdir}|g' src/kmod/Linux/Makefile.26
-sed -i '/struct menu \*current_menu/s/static//' config/kconfig/mconf.c
-sed -i '/KERNEL_SOURCE=/s|=.*|="%{_kernelsrcdir}"|' scripts/kernelsrc
+echo 'obj-m := sheep.o' > src/netdriver/Makefile.26
+sed -i 's@ \./configure @ true @' config/Makefile.master
cat << EOF | sed 's/^ *//' > config/defconfig-ppc
CONFIG_PPC=y
- CONFIG_FBDEV=y
-%if !%{with minimal}
CONFIG_OLDWORLD=y
+ CONFIG_FBDEV=y
+%if %{with minimal}
+ # CONFIG_X11 is not set
+ # CONFIG_VNC is not set
+ # CONFIG_ALSA is not set
+ # CONFIG_OSS is not set
+%else
CONFIG_X11=y
CONFIG_VNC=y
- CONFIG_XDGA=y
CONFIG_ALSA=y
CONFIG_OSS=y
+%endif
+ # CONFIG_XDGA is not set
CONFIG_USBDEV=y
+ # CONFIG_PCIPROXY is not set
+
+ ### Debugging
CONFIG_TTYDRIVER=y
-%else
- # CONFIG_OLDWORLD is not set
- # CONFIG_X11 is not set
- # CONFIG_VNC is not set
- # CONFIG_XDGA is not set
- # CONFIG_ALSA is not set
- # CONFIG_OSS is not set
- # CONFIG_USBDEV is not set
- # CONFIG_TTYDRIVER is not set
-%endif
%if %{with debugger}
CONFIG_DEBUGGER=y
+ CONFIG_DHCP_DEBUG=y
%else
# CONFIG_DEBUGGER is not set
+ # CONFIG_DHCP_DEBUG is not set
%endif
+%if 0%{?debug:1}
+ CONFIG_SCSIDEBUG=y
+ CONFIG_DUMP_PACKETS=y
+%else
+ # CONFIG_SCSIDEBUG is not set
+ # CONFIG_DUMP_PACKETS is not set
+%endif
+ # CONFIG_HOSTED is not set
+
### Network drivers
CONFIG_TUN=y
CONFIG_TAP=y
CONFIG_SHEEP=y
-
EOF
%build
-%{__autoheader}
-%{__autoconf}
-
-CFLAGS="%{rpmcflags} -I/usr/include/ncurses -DNETLINK_TAPBASE=16"; export CFLAGS
-
+rm config/configure/configure
+%{__make} configure
+cd obj-ppc/config
+CPPFLAGS="-I/usr/include/ncurses"; export CPPFLAGS
%configure \
-%if !%{with minimal}
- --with-x \
- --enable-alsa \
- --enable-xdga \
- --enable-png
+ AS="%{__cc} -c" \
+%if %{with minimal}
+ --disable-alsa \
+ --disable-png \
%endif
+ --disable-xdga
+cd ../..
-%{__make} clean
+export TERM=dumb
%{__make} defconfig
+
+%if %{with userspace}
%{__make} \
- prefix=%{_prefix}
+ NCURSES_INCLUDES="-I/usr/include/ncurses" \
+ prefix=%{_prefix} \
+ BUILD_MODS=n
+%endif
-cd src/kmod/build
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
- if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
- exit 1
- fi
- install -d o/include/linux
- ln -sf %{_kernelsrcdir}/config-$cfg o/.config
- ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
- ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
-
- %if %{with dist_kernel}
- %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
- %else
- install -d o/include/config
- touch o/include/config/MARKER
- ln -sf %{_kernelsrcdir}/scripts o/scripts
- %endif
-
- %{__make} -C %{_kernelsrcdir} modules \
- CC="%{__cc}" CPP="%{__cpp}" \
- M=$PWD O=$PWD/o \
- %{?with_verbose:V=1}
- mv mol.ko mol-$cfg.ko
-done
-
-cd ../../netdriver/build
-echo 'obj-m := sheep.o' > Makefile
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
- if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
- exit 1
- fi
- install -d o/include/linux
- ln -sf %{_kernelsrcdir}/config-$cfg o/.config
- ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
- ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
-
- %if %{with dist_kernel}
- %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
- %else
- install -d o/include/config
- touch o/include/config/MARKER
- ln -sf %{_kernelsrcdir}/scripts o/scripts
- %endif
-
- %{__make} -C %{_kernelsrcdir} modules \
- CC="%{__cc}" CPP="%{__cpp}" \
- M=$PWD O=$PWD/o \
- %{?with_verbose:V=1}
- mv sheep.ko sheep-$cfg.ko
-done
-cd ../../..
+%if %{with kernel}
+%{__make} obj-ppc/include/molversion.h local-includes
+
+%{__make} -C src/kmod/Linux setup-common
+%build_kernel_modules T=$TMPDIR -m mol -C obj-ppc/build/src/kmod
+
+%{__make} -C src/netdriver setup-tree-26
+%build_kernel_modules -m sheep -C obj-ppc/build/src/netdriver
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-#install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-
+%if %{with userspace}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
prefix=%{_prefix} \
docdir=/moldoc
-
-#install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+%endif
%if %{with kernel}
-cd src
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-install kmod/build/mol-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/mol.ko
-install netdriver/build/sheep-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/sheep.ko
-%if %{with smp} && %{with dist_kernel}
-install kmod/build/mol-smp.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/mol.ko
-install netdriver/build/sheep-smp.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/sheep.ko
-%endif
-cd ..
+%install_kernel_modules -m obj-ppc/build/src/{kmod/mol,netdriver/sheep} -d misc
%endif
%clean
rm -rf $RPM_BUILD_ROOT
-#%post
-#/sbin/chkconfig --add mol
-#if [ -f /var/lock/subsys/mol ]; then
-# /etc/rc.d/init.d/mol stop 1>&2
-# /etc/rc.d/init.d/mol start 1>&2
-#else
-# echo "Run \"/etc/rc.d/init.d/mol start\" to load modules"
-#fi
-
-#%preun
-#if [ "$1" = "0" ]; then
-# if [ -f /var/lock/subsys/mol ]; then
-# /etc/rc.d/init.d/mol stop 1>&2
-# fi
-# /sbin/chkconfig --del mol
-#fi
-
%if %{with kernel}
-%post -n kernel%{_alt_kernel}-%{name}
+%post -n kernel%{_alt_kernel}-misc-mol
%depmod %{_kernel_ver}
-%postun -n kernel%{_alt_kernel}-%{name}
+%postun -n kernel%{_alt_kernel}-misc-mol
%depmod %{_kernel_ver}
%if %{with smp} && %{with dist_kernel}
-%post -n kernel%{_alt_kernel}-smp-%{name}
+%post -n kernel%{_alt_kernel}-smp-misc-mol
%depmod %{_kernel_ver}smp
-%postun -n kernel%{_alt_kernel}-smp-%{name}
+%postun -n kernel%{_alt_kernel}-smp-misc-mol
%depmod %{_kernel_ver}smp
%endif
%endif
+%if %{with userspace}
%files
%defattr(644,root,root,755)
%doc $RPM_BUILD_ROOT/moldoc/*
@@ -306,8 +246,7 @@
%if %{with debugger}
%attr(755,root,root) %{_mol_libdir}/bin/moldeb
%endif
-#%attr(754,root,root) /etc/rc.d/init.d/mol
-%attr(755,root,root) %{_mol_libdir}/mol.symbols
+%{_mol_libdir}/mol.symbols
%dir %{_mol_datadir}
%{_mol_datadir}/images
%{_mol_datadir}/oftrees
@@ -320,18 +259,22 @@
%{_mol_datadir}/startboing
%dir %{_mol_localstatedir}
%{_mol_localstatedir}/nvram.nw
+%{_mol_localstatedir}/nvram.x
%{_mandir}/man1/*
%{_mandir}/man5/*
+%endif
%if %{with kernel}
-%files -n kernel%{_alt_kernel}-%{name}
+%files -n kernel%{_alt_kernel}-misc-mol
%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/misc/*
+/lib/modules/%{_kernel_ver}/misc/mol.ko*
+/lib/modules/%{_kernel_ver}/misc/sheep.ko*
%if %{with smp} && %{with dist_kernel}
-%files -n kernel%{_alt_kernel}-smp-%{name}
+%files -n kernel%{_alt_kernel}-smp-misc-mol
%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/misc/*
+/lib/modules/%{_kernel_ver}smp/misc/mol.ko*
+/lib/modules/%{_kernel_ver}smp/misc/sheep.ko*
%endif
%endif
@@ -341,8 +284,43 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
-Revision 1.40 2006/11/06 16:04:12 sparky
-- oops, fixed docs instalation
+Revision 1.41 2006/11/16 21:16:25 sparky
+- merged from DEVEL
+
+Revision 1.39.2.11 2006/11/16 20:54:11 sparky
+- added scripts patch
+- kernel-mol renamed to kernel-misc-mol
+
+Revision 1.39.2.10 2006/11/16 20:01:15 sparky
+- some BRs, gcc >= 4.0 because of -iquote
+
+Revision 1.39.2.9 2006/11/16 19:36:39 sparky
+- fixes
+
+Revision 1.39.2.8 2006/11/12 18:14:40 sparky
+- nicer
+
+Revision 1.39.2.7 2006/11/11 14:43:54 sparky
+- use %build_kernel_modules, %install_kernel_modules macros
+
+Revision 1.39.2.6 2006/11/07 14:52:16 sparky
+- don't include very noisy debugging options by default
+
+Revision 1.39.2.5 2006/11/07 14:30:53 sparky
+- added iquote patch, requires to use gcc as assembler
+
+Revision 1.39.2.4 2006/11/07 04:23:12 sparky
+- TERM=dumb, colors look awful in buildlogs
+
+Revision 1.39.2.3 2006/11/06 15:57:58 sparky
+- fixed doc and mol placement
+
+Revision 1.39.2.2 2006/11/06 15:23:53 sparky
+- up to 0.9.71.1, builds
+
+Revision 1.39.2.1 2006/11/06 15:08:58 sparky
+- gentoo 0.9.71-pre9 version, updated long time ago,
+ this one is ont working for me, will try 0.9.71.1 soon
Revision 1.39 2006/09/29 16:52:34 sparky
- start playing with it, works for me (and probably only for my) DO NOT TOUCH
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/mol.spec?r1=1.40&r2=1.41&f=u
More information about the pld-cvs-commit
mailing list