/[smeserver]/builds_bin/macros
ViewVC logotype

Contents of /builds_bin/macros

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Dec 7 03:10:26 2006 UTC (17 years, 11 months ago) by slords
Branch: MAIN
Changes since 1.1: +3 -6 lines
Tools update

1 ## Build directory
2 %_topdir %(echo $HOME)/rpms
3
4 %_signature gpg
5 %_gpg_name SME Server 7 signing key <bugteam@contribs.org>
6 %_gpgbin /usr/bin/gpg
7
8 %_packager SME Server, Inc. <http://smeserver.org>
9
10 ## Disable the -debug symbol packages
11 %debug_package %{nil}
12
13 # Compiler optimizations
14 %_smp_mflags -j5
15
16 %distversion %(rpm -qf --qf='%{VERSION}' /etc/redhat-release)
17 %distname %(grep -i fedora /etc/redhat-release >/dev/null && echo "Fedora Core" || echo "Red Hat Linux")
18 %distver el%{distversion}
19 %disttag .%{distver}.sme
20 %smerelease() %(echo "%{?1}%{?disttag}.%{?2}" | sed -e's|\\.$||')
21
22 #---------------------------------------------------------------------
23
24 %evr %{?epoch:%{epoch}:}%{version}-%{release}
25
26 %_kversion %(ls /usr/src/kernels/ | sed -n 's|^\\([^-]\\+-[^-]\\+\\)-.*|\\1|p' | tail -1)
27 %_krelver %(echo "%{_kversion}" | sed -e 's|-|_|g')
28
29 %kmod_kernelsrcdir() %(echo "/usr/src/kernels/%{_kversion}-%{?1}-%{_target_cpu}" | sed -e's|--|-|')
30 %kmod_moduledir() /lib/modules/%{_kversion}%{?1}/updates
31
32 %_with_smp %(test -d %{kmod_kernelsrcdir smp} && echo 1 || echo 0)
33 %_with_hugemem %(test -d %{kmod_kernelsrcdir hugemem} && echo 1 || echo 0)
34
35 %kmod() \
36 %{expand:%%global _kmodname %1} \
37 %{expand:%%global _kmodversion %2} \
38 %{expand:%%global _kmodrelease %3} \
39 Name: kmod-%{_kmodname} \
40 Version: %{_kmodversion} \
41 Release: %{_kmodrelease}.%{_krelver} \
42 Packager: %{_packager} \
43 License: GPL \
44 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(id -u -n)-root
45
46 %kmod_dependencies() \
47 Summary: %{_kmodname} kernel module(s) \
48 Group: System Environment/Kernel \
49 BuildRequires: gcc \
50 BuildRequires: %(echo "kernel-%{?1}-devel" | sed -e's|--|-|') = %{_kversion} \
51 Requires: /sbin/depmod \
52 Requires: %(echo "kernel-%{?1}-%{_target_cpu}" | sed -e's|--|-|') = %{_kversion} \
53 Provides: %{_kmodname}-kmod = %{evr} \
54 Provides: kernel-modules = %{_kversion}%{?1} \
55 Provides: %(echo "kmod-%{_kmodname}-%{?1}" | sed -e's|-$||') = %{evr}
56
57 %kmod_desc() \
58 %description %{?1}\
59 This package provides the %{_kmodname} kernel modules built for the Linux \
60 kernel %{_kversion}%{?1} for the %{_target_cpu} family of processors.
61
62 %kmod_scripts() \
63 %post %{?1} \
64 depmod -aeF /boot/System.map-%{_kversion}%{?1} %{_kversion}%{?1} > /dev/null 2>&1 || : \
65 %postun %{?1} \
66 depmod -aeF /boot/System.map-%{_kversion}%{?1} %{_kversion}%{?1} > /dev/null 2>&1 || :

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed