/[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 - (show annotations) (download)
Tue Jan 17 19:59:50 2012 UTC (12 years, 3 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 %define major 1
2 %define libname %mklibname %{name} %{major}
3 %define develname %mklibname %{name} -d
4
5 %bcond_without dietlibc
6
7 Summary: Kernel modules management tools
8 Name: kmod
9 Version: 4
10 Release: %mkrel 1
11 Source0: http://packages.profusion.mobi/kmod/%{name}-%{version}.tar.xz
12 # dietlibc has no support for this fine timing:
13 Patch0: 0001-Check-if-struct-stat-has-mtim-member.patch
14 # 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 License: GPLv2+
19 Group: System/Kernel and hardware
20 #Url1: http://www.politreco.com/2011/12/announce-kmod-1/
21 Url: http://git.profusion.mobi/cgit.cgi/kmod.git/
22 BuildRequires: zlib-devel
23 BuildRequires: lzma-devel
24 %if %{with dietlibc}
25 BuildRequires: dietlibc-devel
26 %endif
27
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 License: LGPLv2+
35
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 License: LGPLv2+
57
58 %description -n %{develname}
59 Development files and headers for %{name}.
60
61
62
63 %prep
64 %setup -q
65 %apply_patches
66
67 %build
68 mkdir diet
69 pushd diet
70 %if %{with dietlibc}
71 CC="diet gcc" ../configure --with-zlib --with-xz --enable-static --disable-shared --disable-tools
72 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 %configure --with-zlib --with-xz
77 %make
78
79 %install
80 rm -rf %{buildroot}
81 %makeinstall_std
82 rm -f %buildroot/%_libdir/libkmod.la
83 %if %{with dietlibc}
84 install -m644 ./diet/libkmod/.libs/libkmod.a -D %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/libkmod.a
85 %endif
86
87 %check
88 make test
89
90 %clean
91 rm -rf %{buildroot}
92
93 %files
94 %_bindir/*
95 %_mandir/*/*
96
97 %files -n %{libname}
98 %_libdir/libkmod.so.%major
99 %_libdir/libkmod.so.%major.*
100
101 %files -n %{develname}
102 %_libdir/pkgconfig/libkmod.pc
103 %_includedir/libkmod.h
104 %_libdir/*.so
105 %if %{with dietlibc}
106 %{_prefix}/lib/dietlibc/lib-%{_arch}/libkmod.a
107 %endif
108
109

  ViewVC Help
Powered by ViewVC 1.1.30