SPECS: linux-fusion.spec (NEW) - new

qboosh qboosh at pld-linux.org
Sun Oct 23 11:42:41 CEST 2005


Author: qboosh                       Date: Sun Oct 23 09:42:41 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- new

---- Files affected:
SPECS:
   linux-fusion.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/linux-fusion.spec
diff -u /dev/null SPECS/linux-fusion.spec:1.1
--- /dev/null	Sun Oct 23 11:42:41 2005
+++ SPECS/linux-fusion.spec	Sun Oct 23 11:42:36 2005
@@ -0,0 +1,179 @@
+# $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	dist_kernel	# allow non-distribution kernel
+%bcond_without	kernel		# don't build kernel modules
+%bcond_without	smp		# don't build SMP module
+%bcond_without	userspace	# don't build userspace programs
+%bcond_with	verbose		# verbose build (V=1)
+
+%if %{without kernel}
+%undefine	with_dist_kernel
+%endif
+
+Summary:	Fusion Linux kernel module
+Summary(pl):	Moduł Fusion dla jądra Linuksa
+Name:		linux-fusion
+Version:	1.1
+%define		_rel	0.1
+Release:	%{_rel}
+License:	GPL v2+
+Group:		Base/Kernel
+Source0:	http://www.directfb.org/download/DirectFB/%{name}-%{version}.tar.gz
+# Source0-md5:	227b62ee7374e4651355299147719c82
+URL:		http://www.directfb.org/
+%if %{with kernel}
+%{?with_dist_kernel:BuildRequires:	kernel-module-build >= 2.6.7}
+BuildRequires:	rpmbuild(macros) >= 1.217
+%endif
+BuildRequires:	sed >= 4.0
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Fusion Linux kernel module.
+
+%description -l pl
+Moduł Fusion dla jądra Linuksa.
+
+%package devel
+Summary:	Header file for Fusion device
+Summary(pl):	Plik nagłówkowy dla urządzenia Fusion
+Group:		Development/Libraries
+Requires:	linux-libc-headers
+
+%description devel
+Header file for Fusion device.
+
+%description devel -l pl
+Plik nagłówkowy dla urządzenia Fusion.
+
+%package -n kernel-char-fusion
+Summary:	Fusion module for Linux kernel
+Summary(pl):	Moduł Fusion dla jądra Linuksa
+Release:	%{_rel}@%{_kernel_ver_str}
+Group:		Base/Kernel
+Requires(post,postun):	/sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel_up
+Requires(postun):	%releq_kernel_up
+%endif
+
+%description -n kernel-char-fusion
+Fusion module for Linux kernel.
+
+%description -n kernel-char-fusion -l pl
+Moduł Fusion dla jądra Linuksa.
+
+%package -n kernel-smp-char-fusion
+Summary:	Fusion module for Linux SMP kernel
+Summary(pl):	Moduł Fusion dla jądra Linuksa SMP
+Release:	%{_rel}@%{_kernel_ver_str}
+Group:		Base/Kernel
+Requires(post,postun):	/sbin/depmod
+%if %{with dist_kernel}
+%requires_releq_kernel_smp
+Requires(postun):	%releq_kernel_smp
+%endif
+
+%description -n kernel-smp-char-fusion
+Fusion module for Linux SMP kernel.
+
+%description -n kernel-smp-char-fusion -l pl
+Moduł Fusion dla jądra Linuksa SMP.
+
+%prep
+%setup -q
+
+sed -i -e 's/^obj-[^ ]*/obj-m/' linux/drivers/char/fusion/Makefile-2.6
+echo "EXTRA_CFLAGS = -I`pwd`/linux/include" >> linux/drivers/char/fusion/Makefile-2.6
+
+%build
+%if %{with kernel}
+cd linux/drivers/char/fusion
+ln -sf Makefile-2.6 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
+	rm -rf include
+	install -d include/{linux,config}
+	ln -sf %{_kernelsrcdir}/config-$cfg .config
+	ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
+	ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
+	ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
+	touch include/config/MARKER
+	%{__make} -C %{_kernelsrcdir} clean \
+		RCS_FIND_IGNORE="-name '*.ko' -o" \
+		M=$PWD O=$PWD \
+		%{?with_verbose:V=1}
+	%{__make} -C %{_kernelsrcdir} modules \
+		CC="%{__cc}" CPP="%{__cpp}" \
+		M=$PWD O=$PWD \
+		%{?with_verbose:V=1}
+
+	mv fusion{,-$cfg}.ko
+done
+cd ../../../..
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with userspace}
+install -d $RPM_BUILD_ROOT%{_includedir}/linux
+install linux/include/linux/fusion.h $RPM_BUILD_ROOT%{_includedir}/linux
+%endif
+
+%if %{with kernel}
+cd linux/drivers/char/fusion
+install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/char
+install fusion-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
+	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/char/fusion.ko
+%if %{with smp} && %{with dist_kernel}
+install fusion-smp.ko \
+	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/char/fusion.ko
+%endif
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-n kernel-char-fusion
+%depmod %{_kernel_ver}
+
+%postun	-n kernel-char-fusion
+%depmod %{_kernel_ver}
+
+%post	-n kernel-smp-char-fusion
+%depmod %{_kernel_ver}smp
+
+%postun	-n kernel-smp-char-fusion
+%depmod %{_kernel_ver}smp
+
+%if %{with userspace}
+%files devel
+%defattr(644,root,root,755)
+%doc ChangeLog TODO
+%{_includedir}/linux/fusion.h
+%endif
+
+%if %{with kernel}
+%files -n kernel-char-fusion
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}/kernel/drivers/char/fusion.ko*
+
+%if %{with smp} && %{with dist_kernel}
+%files -n kernel-smp-char-fusion
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}smp/kernel/drivers/char/fusion.ko*
+%endif
+%endif
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2005/10/23 09:42:36  qboosh
+- new
================================================================



More information about the pld-cvs-commit mailing list