SPECS: kernel-misc-tp_smapi.spec - builds & other changes to finis...
havner
havner at pld-linux.org
Sun Aug 13 21:45:39 CEST 2006
Author: havner Date: Sun Aug 13 19:45:39 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- builds & other changes to finish this spec
---- Files affected:
SPECS:
kernel-misc-tp_smapi.spec (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SPECS/kernel-misc-tp_smapi.spec
diff -u SPECS/kernel-misc-tp_smapi.spec:1.2 SPECS/kernel-misc-tp_smapi.spec:1.3
--- SPECS/kernel-misc-tp_smapi.spec:1.2 Sat Apr 15 23:28:00 2006
+++ SPECS/kernel-misc-tp_smapi.spec Sun Aug 13 21:45:34 2006
@@ -1,33 +1,33 @@
# $Revision$, $Date$
-# TODO:
-# - make it build
-# - wouldn't it be better to replace this spec with a kernel patch ?
-##
+#
+# TODO (kernel):
+# add dmi-decode-and-save-oem-string-information.patch
+# remove hdaps patch (as its provided here and updated more often i think)
+#
# Conditional build:
%bcond_without dist_kernel # allow non-distribution kernel
%bcond_without smp # don't build SMP module
%bcond_with verbose # verbose build (V=1)
-%if %{without kernel}
-%undefine with_dist_kernel
-%endif
-
-#
-# main package.
-#
%define _rel 0.1
Summary: sysfs interface to access ThinkPad's SMAPI functionality
Summary(pl): Interfejs sysfs do funkcjonalności SMAPI ThinkPadów
-Name: kernel-misc-tp_smapi
-Version: 0.19
+Name: kernel%{_alt_kernel}-misc-tp_smapi
+Version: 0.27
Release: %{_rel}
-License: GPL
+License: GPL v2
Group: Applications
Source0: http://dl.sourceforge.net/tpctl/tp_smapi-%{version}.tgz
-# Source0-md5: fdb192b59e05bb826c4ca05a39b42649
+# Source0-md5: ca653a14bed809462066aca842776108
URL: http://tpctl.sourceforge.net/
-%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.14}
+%if %{with dist_kernel}
+BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.14}
+%requires_releq_kernel_up
+Requires(postun): %releq_kernel_up
+%endif
BuildRequires: rpmbuild(macros) >= 1.286
+Requires(post,postun): /sbin/depmod
+ExclusiveArch: %{ix86}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -40,7 +40,7 @@
Ten pakiet zawiera moduł jądra Linuksa.
-%package -n kernel-smp-misc-tp_smapi
+%package -n kernel%{_alt_kernel}-smp-misc-tp_smapi
Summary: Linux SMP driver for tp_smapi
Summary(pl): Sterownik dla Linuksa SMP do tp_smapi
Release: %{_rel}@%{_kernel_ver_str}
@@ -50,19 +50,25 @@
%requires_releq_kernel_smp
Requires(postun): %releq_kernel_smp
%endif
+Requires(post,postun): /sbin/depmod
-%description -n kernel-smp-misc-tp_smapi
+%description -n kernel%{_alt_kernel}-smp-misc-tp_smapi
sysfs interface to access ThinkPad's SMAPI functionality.
This package contains Linux SMP module.
-%description -n kernel-smp-misc-tp_smapi -l pl
+%description -n kernel%{_alt_kernel}-smp-misc-tp_smapi -l pl
Interfejs sysfs do funkcjonalności SMAPI ThinkPadów.
Ten pakiet zawiera moduł jądra Linuksa SMP.
%prep
%setup -q -n tp_smapi-%{version}
+echo "obj-m := thinkpad_ec.o tp_smapi.o hdaps.o" > Makefile
+# following NEEDS to be removed and kernel patched with
+# dmi-decode-and-save-oem-string-information.patch from tp_smapi sources
+# DONT use this driver if [ "`dmidecode | grep 'IBM ThinkPad Embedded Controller'`" == "" ]
+echo '#define DMI_EC_OEM_STRING_KLUDGE "IBM ThinkPad Embedded Controller"' > dmi_ec_oem_string.h
%build
# kernel module(s)
@@ -74,6 +80,7 @@
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
+ ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} o/include/asm
%if %{with dist_kernel}
%{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
%else
@@ -84,16 +91,14 @@
#
# patching/creating makefile(s) (optional)
#
- %{__make} -C %{_kernelsrcdir} \
- TP_VER="%{version}" \
- CFLAGS="%{rpmcflags} -Iinclude/" \
+ %{__make} -C %{_kernelsrcdir} clean \
RCS_FIND_IGNORE="-name '*.ko' -o" \
SYSSRC=%{_kernelsrcdir} \
SYSOUT=$PWD/o \
M=$PWD O=$PWD/o \
%{?with_verbose:V=1}
%{__make} -C %{_kernelsrcdir} modules \
- CFLAGS="%{rpmcflags} -Iinclude/" \
+ CFLAGS="%{rpmcflags} -I$PWD/include -I$PWD/o/include/asm/mach-default" \
CC="%{__cc}" CPP="%{__cpp}" \
SYSSRC=%{_kernelsrcdir} \
SYSOUT=$PWD/o \
@@ -101,6 +106,8 @@
%{?with_verbose:V=1}
mv tp_smapi{,-$cfg}.ko
+ mv thinkpad_ec{,-$cfg}.ko
+ mv hdaps{,-$cfg}.ko
done
%install
@@ -109,33 +116,43 @@
install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
install tp_smapi-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/tp_smapi.ko
+install thinkpad_ec-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/thinkpad_ec.ko
+install hdaps-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/hdaps.ko
%if %{with smp} && %{with dist_kernel}
install tp_smapi-smp.ko \
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/tp_smapi.ko
+install thinkpad_ec-smp.ko \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/thinkpad_ec.ko
+install hdpaps-smp.ko \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/hdaps.ko
%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%post -n kernel-misc-tp_smapi
+%post
%depmod %{_kernel_ver}
-%postun -n kernel-misc-tp_smapi
+%postun
%depmod %{_kernel_ver}
-%post -n kernel-smp-misc-tp_smapi
+%post -n kernel%{_alt_kernel}-smp-misc-tp_smapi
%depmod %{_kernel_ver}smp
-%postun -n kernel-smp-misc-tp_smapi
+%postun -n kernel%{_alt_kernel}-smp-misc-tp_smapi
%depmod %{_kernel_ver}smp
-%files -n kernel-misc-tp_smapi
+%files -n kernel%{_alt_kernel}-misc-tp_smapi
%defattr(644,root,root,755)
+%doc CHANGES README
/lib/modules/%{_kernel_ver}/misc/*.ko*
%if %{with smp} && %{with dist_kernel}
-%files -n kernel-smp-misc-tp_smapi
+%files -n kernel%{_alt_kernel}-smp-misc-tp_smapi
%defattr(644,root,root,755)
+%doc CHANGES README
/lib/modules/%{_kernel_ver}smp/misc/*.ko*
%endif
@@ -145,6 +162,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.3 2006/08/13 19:45:34 havner
+- builds & other changes to finish this spec
+
Revision 1.2 2006/04/15 21:28:00 qboosh
- some try to fix descs mess
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/kernel-misc-tp_smapi.spec?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list