/[smeserver]/builds_bin/macros
ViewVC logotype

Annotation of /builds_bin/macros

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


Revision 1.1 - (hide annotations) (download)
Sat Dec 2 17:19:10 2006 UTC (17 years, 11 months ago) by slords
Branch: MAIN
Update build tools

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