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

  ViewVC Help
Powered by ViewVC 1.1.15