/[packages]/cauldron/kmod/current/SPECS/kmod.spec
ViewVC logotype

Contents of /cauldron/kmod/current/SPECS/kmod.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 197530 - (hide annotations) (download)
Tue Jan 17 19:59:50 2012 UTC (2 years, 8 months ago) by tv
File size: 2869 byte(s)
- new release
- better patch 0 for stat time
- drop patch 2 (no more needed with newer dietlibc)
1 tv 183406 %define major 1
2 tv 195808 %define libname %mklibname %{name} %{major}
3 tv 195807 %define develname %mklibname %{name} -d
4 tv 183406
5 tv 195778 %bcond_without dietlibc
6    
7 tv 183406 Summary: Kernel modules management tools
8     Name: kmod
9 tv 197530 Version: 4
10     Release: %mkrel 1
11 tmb 187109 Source0: http://packages.profusion.mobi/kmod/%{name}-%{version}.tar.xz
12 tv 195778 # dietlibc has no support for this fine timing:
13 tv 197530 Patch0: 0001-Check-if-struct-stat-has-mtim-member.patch
14 tv 195778 # fix headers:
15     Patch1: kmod-3-WEXIT-needs-wait_h.diff
16     # fix more headers:
17     Patch4: kmod-3-fix-diet-size_t.diff
18 tv 183406 License: GPLv2+
19     Group: System/Kernel and hardware
20 tv 183409 #Url1: http://www.politreco.com/2011/12/announce-kmod-1/
21 tv 183406 Url: http://git.profusion.mobi/cgit.cgi/kmod.git/
22 tv 190165 BuildRequires: zlib-devel
23 tv 192235 BuildRequires: lzma-devel
24 tv 195778 %if %{with dietlibc}
25     BuildRequires: dietlibc-devel
26     %endif
27 tv 183406
28     %description
29     Simple tools for managing kernel modules.
30    
31     %package -n %{libname}
32     Summary: Kernel modules management library
33     Group: System/Libraries
34 tv 183408 License: LGPLv2+
35 tv 183406
36     %description -n %{libname}
37     Dynamic libraries for %{name}.
38    
39     The goal of the libkmod library is to offer to other programs the
40     needed flexibility and fine grained control over insertion, removal,
41     configuration and listing of kernel modules. Using the library, with
42     simple pieces of code it's possible to interact with kernel modules
43     and then there's no need to rely on other tools for that. This is a
44     thing lacking on Linux for a while and it's one of the items in the
45     Plumber's Wish List for Linux. Quoting it:
46    
47     provide a proper libmodprobe.so from module-init-tools:
48     Early boot tools, installers, driver install disks want to access
49     information about available modules to optimize boot up handling.
50    
51     %package -n %{develname}
52     Summary: Development files for %{name}
53     Group: Development/C
54     Requires: %{libname} = %{version}-%{release}
55     Provides: %{name}-devel = %{version}-%{release}
56 tv 183408 License: LGPLv2+
57 tv 183406
58     %description -n %{develname}
59     Development files and headers for %{name}.
60    
61    
62    
63     %prep
64     %setup -q
65 tv 195786 %apply_patches
66 tv 183406
67     %build
68 tv 195778 mkdir diet
69     pushd diet
70     %if %{with dietlibc}
71 tv 196476 CC="diet gcc" ../configure --with-zlib --with-xz --enable-static --disable-shared --disable-tools
72 tv 195778 make V=1 LD="diet ld" CC="diet cc" CFLAGS="-Os -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_ATFILE_SOURCE -DO_CLOEXEC=0 -g -DUINT16_MAX=65535 -DINT32_MAX=2147483647"
73     %endif
74     popd
75    
76 tv 195771 %configure --with-zlib --with-xz
77 tv 183406 %make
78    
79     %install
80     rm -rf %{buildroot}
81     %makeinstall_std
82     rm -f %buildroot/%_libdir/libkmod.la
83 tv 195778 %if %{with dietlibc}
84     install -m644 ./diet/libkmod/.libs/libkmod.a -D %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/libkmod.a
85     %endif
86 tv 183406
87 tv 195773 %check
88     make test
89    
90 tv 183406 %clean
91     rm -rf %{buildroot}
92    
93     %files
94     %_bindir/*
95 tv 197530 %_mandir/*/*
96 tv 183406
97     %files -n %{libname}
98     %_libdir/libkmod.so.%major
99     %_libdir/libkmod.so.%major.*
100    
101     %files -n %{develname}
102 tmb 187113 %_libdir/pkgconfig/libkmod.pc
103 tv 183406 %_includedir/libkmod.h
104     %_libdir/*.so
105 tv 195778 %if %{with dietlibc}
106     %{_prefix}/lib/dietlibc/lib-%{_arch}/libkmod.a
107     %endif
108 tv 183406
109    

  ViewVC Help
Powered by ViewVC 1.1.15