ltmodem.spec
Michal Abramowicz
ab_1 w abram.eu.org
Wto, 19 Lip 2005, 13:52:02 CEST
czesc
1. dla # $Revision: 1.37 $, $Date: 2005/02/06 17:37:02 $
czyli head, są archaiczne zależności dla kerneli 2.4
w sekcjach:
%package -n kernel-{,smp}char-ltmodem
Requires(post,postun): modutils >= 2.4.6-3
co raczej powinno być module-init-tools
to tylko taka uwaga
2. ltmodem-8.31a9.tar.gz z którego to buduja się moduły
jest z 2004-11-29 czyli dość stare
3. ltmodem-2.6-alk-7a.tar.gz jest z 2005-07-17
i dla tego źródła zrobiłem speca, i załączam odpowiedniego
diff'a w załączniku.
według tego speca sprawdziłęm działanie ltmodem w dellu latitude ls
p3-550 ;-)
zbudowane i zuywane z:
kernel-grsecurity-headers-2.6.11.10-6
kernel-grsecurity-module-build-2.6.11.10-6
kernel-grsecurity-2.6.11.10-6
pozdrówki,
abram
--
Z punktu widzenia Rewolucji Światowej ludzie zasadniczo
dzielą się na dwie kategorie: na tych, którym trzeba
natychmiast poderżnąć gardło i na tych, którym narazie nie trzeba.
-------------- następna część ---------
--- ltmodem.spec 2005-07-19 13:05:35.000000000 +0200
+++ ltmodem.spec_26 2005-07-19 13:45:31.000000000 +0200
@@ -1,29 +1,27 @@
-# $Revision: 1.37 $, $Date: 2005/02/06 17:37:02 $
-#
-# Conditional build:
-%bcond_without dist_kernel # without kernel from distribution
-%bcond_without smp # build the SMP driver
-
-%define _rel 1
-
-Summary: Kernel module for Lucent modems
-Summary(de): Kernmodul für Lucent-Modems
-Summary(pl): Moduł jądra dla modemów Lucent
+%define maintaner alk
+%define origrel 7a
+%define ver 2.6
+
+%define _rel 1
+
+%bcond_without smp # build the SMP driver
+
+Summary: Kernel module for Lucent modems
+Summary(de): Kernmodul für Lucent-Modems
+Summary(pl): Moduł jądra dla modemów Lucent
Name: ltmodem
-Version: 8.31a9
+Version: %{ver}_%{maintaner}_%{origrel}
Release: %{_rel}
-License: unknown
+License: Proprietary
Group: Base/Kernel
-Source0: http://linmodems.technion.ac.il/packages/ltmodem/archive/source/%{name}-%{version}.tar.gz
-# NoSource0-md5: bd0e54ddb2c7037b644b9c6cb6bce9ea
-NoSource: 0
-URL: http://linmodems.technion.ac.il/Ltmodem.html
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-BuildRequires: autoconf
-%{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.3.0}
+Source0: http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/%{name}-%{ver}-%{maintaner}-%{origrel}.tar.gz
+# Source0-md5: d787ab30c73e4e0f7c9485bfb8a1c26d
+URL: http://linmodems.technion.ac.il/resources.html
+BuildRequires: kernel-module-build >= 2.6.0
+BuildRequires: %{kgcc_package}
BuildRequires: rpmbuild(macros) >= 1.118
ExclusiveArch: %{ix86}
-ExclusiveOS: Linux
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
ltmodem is a kernel module supporting Lucent-chip-based modems. These
@@ -38,17 +36,17 @@
Lucent. Modemy te udostępniane są jako urządzenie /dev/ttyLT0.
%package -n kernel-char-ltmodem
-Summary: Kernel module for Lucent modems
-Summary(de): Kernmodul für Lucent-Modems
-Summary(pl): Moduł jądra dla modemów Lucent
-Release: %{_rel}@%{_kernel_ver_str}
-Group: Base/Kernel
+Summary: Kernel module for Lucent modems
+Summary(de): Kernmodul für Lucent-Modems
+Summary(pl): Moduł jądra dla modemów Lucent
+Release: %{_rel}@%{_kernel_ver_str}
+Group: Base/Kernel
%{?with_dist_kernel:%requires_releq_kernel_up}
-Requires(post,postun): modutils >= 2.4.6-3
-Requires: dev >= 2.7.7-9
-Conflicts: ppp < 2.4.0
-Obsoletes: ltmodem
-Obsoletes: kernel-net-ltmodem
+Requires(post,postun): module-init-tools
+Requires: dev >= 2.7.7-9
+Conflicts: ppp < 2.4.0
+Obsoletes: ltmodem
+Obsoletes: kernel-net-ltmodem
%description -n kernel-char-ltmodem
ltmodem is a kernel module supporting Lucent-chip-based modems. These
@@ -63,17 +61,17 @@
Lucent. Modemy te udostępniane są jako urządzenie /dev/ttyLT0.
%package -n kernel-smp-char-ltmodem
-Summary: Kernel module for Lucent modems
-Summary(de): Kernmodul für Lucent-Modems
-Summary(pl): Moduł jądra dla modemów Lucent
-Release: %{_rel}@%{_kernel_ver_str}
-Group: Base/Kernel
-%{?with_dist_kernel:%requires_releq_kernel_smp}
-Requires(post,postun): modutils >= 2.4.6-3
-Requires: dev >= 2.7.7-9
-Conflicts: ppp < 2.4.0
-Obsoletes: ltmodem
-Obsoletes: kernel-smp-net-ltmodem
+Summary: Kernel module for Lucent modems
+Summary(de): Kernmodul für Lucent-Modems
+Summary(pl): Moduł jądra dla modemów Lucent
+Release: %{_rel}@%{_kernel_ver_str}
+Group: Base/Kernel
+%{?with_dist_kernel:%requires_releq_kernel_up}
+Requires(post,postun): module-init-tools
+Requires: dev >= 2.7.7-9
+Conflicts: ppp < 2.4.0
+Obsoletes: ltmodem
+Obsoletes: kernel-net-ltmodem
%description -n kernel-smp-char-ltmodem
ltmodem is a kernel module supporting Lucent-chip-based modems. These
@@ -88,204 +86,79 @@
Lucent. Modemy te udostępniane są jako urządzenie /dev/ttyLT0.
%prep
-%setup -q
-tar xzf source.tar.gz
+%setup -q -n %{name}-%{ver}-%{maintaner}-%{origrel}
%build
-cd source
-%{__autoconf}
-
-CFLAGS="%{rpmcflags} -I%{_kernelsrcdir}/include"
-%configure \
- --with-force=yes \
- --with-kernel=%{_kernelsrcdir}
for cfg in up %{?with_smp:smp}; do
+ if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
+ exit 1
+ fi
rm -rf include
+ install -d modules
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
touch include/config/MARKER
+
+ %{__make} -C %{_kernelsrcdir} clean \
+ RCS_FIND_IGNORE="-name '*.ko' -o" \
+ M=$PWD O=$PWD \
%{__make} -C %{_kernelsrcdir} modules \
CC="%{__cc}" CPP="%{__cpp}" \
- M=$PWD O=$PWD V=1
- mkdir $cfg
- mv lt_*.o *.ko $cfg
+ M=$PWD O=$PWD \
+
+ for mod in *.ko; do
+ mod=$(echo "$mod" | sed -e 's#\.ko##g')
+ mv -v $mod.ko modules/$mod-$cfg.ko
+ done
done
%install
rm -rf $RPM_BUILD_ROOT
-install -dD $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-install source/up/*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
+install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
+cd modules
%if %{with smp}
-install source/smp/*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc
-%endif
+for mod in *smp.ko; do
+ nmod=$(echo "$mod" | sed -e 's#-smp##g')
+ install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/$nmod
+done
+%endif
-rm -rf DOCs/Installers
+for mod in *up.ko; do
+ nmod=$(echo "$mod" | sed -e 's#-up##g')
+ install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
+done
%clean
rm -rf $RPM_BUILD_ROOT
-%post -n kernel-char-ltmodem
+%post -n kernel-smp-char-ltmodem
%depmod %{_kernel_ver}
-%postun -n kernel-char-ltmodem
+%postun -n kernel-smp-char-ltmodem
%depmod %{_kernel_ver}
-%post -n kernel-smp-char-ltmodem
-%depmod %{_kernel_ver}smp
-
-%postun -n kernel-smp-char-ltmodem
-%depmod %{_kernel_ver}smp
+%post -n kernel-char-ltmodem
+%depmod %{_kernel_ver}
-%files -n kernel-char-ltmodem
-%defattr(644,root,root,755)
-%doc 1ST-READ DOCs/* source/{CHANGELOG,UPDATES-BUGS}
-/lib/modules/%{_kernel_ver}/*/*
+%postun -n kernel-char-ltmodem
+%depmod %{_kernel_ver}
%if %{with smp}
%files -n kernel-smp-char-ltmodem
%defattr(644,root,root,755)
-%doc 1ST-READ DOCs/* source/{CHANGELOG,UPDATES-BUGS}
-/lib/modules/%{_kernel_ver}smp/*/*
+%doc docs/*
+/lib/modules/%{_kernel_ver}smp/misc/lt*.*o.*
%endif
+%files -n kernel-char-ltmodem
+%defattr(644,root,root,755)
+%doc docs/*
+/lib/modules/%{_kernel_ver}/misc/lt*.*o.*
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback w pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
-$Log: ltmodem.spec,v $
-Revision 1.37 2005/02/06 17:37:02 saq
-- up to 8.31a9
-- updated URL
-- dropped obsolete patch0
-- various build fixes
-- even its authors don't know the license
-
-Revision 1.36 2003/09/18 16:00:37 pius
-- updated to 8.26a9
- (this version also works with kernel compiled with gcc3)
-
-Revision 1.35 2003/07/10 13:49:49 trojan
-- added using depmod macro
-
-Revision 1.34 2003/05/28 12:59:38 malekith
-- massive attack: source-md5
-
-Revision 1.33 2003/05/25 05:50:18 misi3k
-- massive attack s/pld.org.pl/pld-linux.org/
-
-Revision 1.32 2003/05/16 08:53:05 trojan
-- fixed depmod in %%post and %%postun when build with _without_dist_kernel
-
-Revision 1.31 2003/05/14 14:42:44 qboosh
-- added depmod options so modules can be installed for kernel other than running
-
-Revision 1.30 2003/04/11 10:01:37 qboosh
-- standardized kernel modules perms (644,root,root)
-
-Revision 1.29 2003/03/13 13:23:49 qboosh
-- Obsoletes for old names
-
-Revision 1.28 2003/03/03 14:57:11 adamg
-- package are now named kernel{-smp}-char-ltmodem-*
-
-Revision 1.27 2002/11/27 21:10:42 juandon
-- new %%doc
-
-Revision 1.26 2002/05/21 23:14:06 kloczek
-perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
- s/^automake -a -c -f/\%\{__automake\}/; \
- s/^autoconf/\%\{__autoconf\}/"
-
-Revision 1.25 2002/05/14 15:46:12 ankry
-- fixed URL
-
-Revision 1.24 2002/04/14 11:43:13 saq
-- "SMP kernels are not supported with this driver", so %%if 0 SMP building
-- pass kernel include dir manually, configure.in won't do this
-- STBR on nest and test it
-
-Revision 1.23 2002/04/14 11:31:56 saq
-- introduce current module building scheme ({SM,U}P in one pass}
-- cleanups
-- NFY, need to fix SMP building
-
-Revision 1.22 2002/04/14 10:30:53 filon
-- updated to 6.00c2
-- removed unneded docs
-
-Revision 1.21 2002/04/07 07:22:49 filon
-- updated to 6.00b14
-
-Revision 1.20 2002/03/15 17:34:22 dzimi
-- back revision 1.18, my fault with commit my workdir :/
-
-Revision 1.18 2002/02/22 23:29:14 kloczek
-- removed all Group fields translations (oure rpm now can handle translating
- Group field using gettext).
-
-Revision 1.17 2002/01/18 02:13:45 kloczek
-perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
-
-Revision 1.16 2001/10/16 10:41:42 qboosh
-- added empty base package to remove junk from .src.rpm name
-
-Revision 1.15 2001/09/19 21:47:08 saq
-- new module naming scheme
-- s/-/_/g in @... suffix
-
-Revision 1.14 2001/09/13 08:35:22 saq
-- updated for 6.00a
-
-Revision 1.13 2001/08/24 22:40:45 saq
-- s/install -m644/cp/
-- adapterized
-
-Revision 1.12 2001/08/15 20:29:29 saq
-- use %%_kernelsrcdir
-- cleanups
-- STB
-
-Revision 1.11 2001/08/10 20:45:55 saq
-- smp conditional build
-
-Revision 1.10 2001/07/26 16:50:25 saq
-- don't use macros not available in standard rpm. Define them in the spec.
-(_kernel_ver, _kernel24)
-
-Revision 1.9 2001/07/23 22:22:52 saq
-A group commit:
-- %define _kernel_ver and _kernel24 removed (already in rpm.macros)
-- kernel modules get a @%{_kernel_ver} release suffix and conflict wrong
-kernel version
-- other packages get a @%{_kernel_series} release suffix and conflict
-wrong kernel series
-- need a rebuilt RPM to build these
-
-Revision 1.8 2001/06/03 18:40:35 kloczek
-- release 2.
-
-Revision 1.7 2001/06/03 18:36:19 saq
-- conflicts with kernel < 2.4.0 (incompatible new serial driver)
-- STB
-
-Revision 1.6 2001/05/30 05:54:55 kloczek
-- simplifications in %install.
-
-Revision 1.5 2001/05/28 19:12:18 saq
-- updated to 5.99b
-- won't work with PLD kernel
-
-Revision 1.4 2001/03/19 22:22:51 saq
-- removed /dev/* (went to dev.spec)
-
-Revision 1.3 2001/03/19 17:22:17 saq
-- upgrade to 5.78e
-
-Revision 1.2 2000/12/04 17:27:02 saq
-- update to 5.78
-- a specific kernel's no longer required
-
-Revision 1.1 2000/10/19 22:53:50 saq
-- initial release
Więcej informacji o liście dyskusyjnej pld-devel-pl