]>
Commit | Line | Data |
---|---|---|
7395c18c ER |
1 | %define patchlevel r1 |
2 | Summary: A cross-platform build environment | |
3 | Name: kBuild | |
4 | Version: 0.1.98 | |
5 | Release: 3%{?patchlevel:.%{patchlevel}} | |
6 | Group: Development/Tools | |
7 | # Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU | |
8 | License: BSD and GPL v2+ | |
9 | URL: http://svn.netlabs.org/kbuild | |
10 | #Source0: ftp://ftp.netlabs.org/pub/kbuild/%{name}-%{version}%{?patchlevel:-%{patchlevel}}-src.tar.gz | |
11 | # svn co -e2537 http://svn.netlabs.org/repos/kbuild/trunk@2537 kBuild | |
12 | # tar czf kBuild-r2537.tar.gz --exclude .svn kBuild | |
13 | Source0: %{name}-r2537.tar.gz | |
14 | Patch0: %{name}-0.1.3-escape.patch | |
15 | Patch1: %{name}-0.1.5-dprintf.patch | |
16 | Patch2: %{name}-0.1.5-pthread.patch | |
17 | BuildRequires: acl-devel | |
18 | BuildRequires: autoconf | |
19 | BuildRequires: automake | |
20 | BuildRequires: byacc | |
21 | BuildRequires: cvs | |
22 | BuildRequires: flex | |
23 | BuildRequires: gettext-devel | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | This is a GNU make fork with a set of scripts to simplify complex | |
28 | tasks and portable versions of various UNIX tools to ensure | |
29 | cross-platform portability. | |
30 | ||
31 | It is used mainly to build VirtualBox OSE packages for RPM Fusion | |
32 | repository. | |
33 | ||
34 | %prep | |
35 | %setup -q -n %{name} | |
36 | %patch0 -p1 | |
37 | %patch1 -p1 | |
38 | %patch2 -p1 | |
39 | ||
40 | # Remove prebuilt stuff | |
41 | rm -rf kBuild/bin/* | |
42 | ||
43 | # The bootstrap would probably not be needed if we depended on ourselves, | |
44 | # yet it is not guarranteed that new versions are compilable with older | |
45 | # kmk versions, so with this we are on a safer side | |
46 | find -name config.log -delete | |
47 | ||
48 | %build | |
49 | %define bootstrap_mflags %{_smp_mflags} \\\ | |
50 | CFLAGS="%{optflags}" \\\ | |
51 | KBUILD_VERBOSE=2 \\\ | |
52 | KBUILD_VERSION_PATCH=999 | |
53 | ||
54 | %define mflags %{bootstrap_mflags} \\\ | |
55 | NIX_INSTALL_DIR=%{_prefix} \\\ | |
56 | BUILD_TYPE=release \\\ | |
57 | MY_INST_MODE=0644 \\\ | |
58 | MY_INST_BIN_MODE=0755 | |
59 | ||
60 | cd src/kmk | |
61 | %{__libtoolize} | |
62 | %{__aclocal} -I config | |
63 | %{__autoconf} | |
64 | %{__autoheader} | |
65 | %{__automake} | |
66 | cd - | |
67 | ||
68 | kBuild/env.sh --full \ | |
69 | %{__make} -f bootstrap.gmk %{bootstrap_mflags} | |
70 | ||
71 | kBuild/env.sh kmk %{mflags} rebuild | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | export KBUILD_VERBOSE=2 | |
76 | kBuild/env.sh kmk %{mflags} install \ | |
77 | PATH_INS=$RPM_BUILD_ROOT | |
78 | ||
79 | # These are included later in files section | |
80 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %files | |
86 | %defattr(644,root,root,755) | |
87 | %doc COPYING ChangeLog | |
88 | %doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference* | |
89 | %attr(755,root,root) %{_bindir}/kDepIDB | |
90 | %attr(755,root,root) %{_bindir}/kDepObj | |
91 | %attr(755,root,root) %{_bindir}/kDepPre | |
92 | %attr(755,root,root) %{_bindir}/kObjCache | |
93 | %attr(755,root,root) %{_bindir}/kmk | |
94 | %attr(755,root,root) %{_bindir}/kmk_append | |
95 | %attr(755,root,root) %{_bindir}/kmk_ash | |
96 | %attr(755,root,root) %{_bindir}/kmk_cat | |
97 | %attr(755,root,root) %{_bindir}/kmk_chmod | |
98 | %attr(755,root,root) %{_bindir}/kmk_cmp | |
99 | %attr(755,root,root) %{_bindir}/kmk_cp | |
100 | %attr(755,root,root) %{_bindir}/kmk_echo | |
101 | %attr(755,root,root) %{_bindir}/kmk_expr | |
102 | %attr(755,root,root) %{_bindir}/kmk_gmake | |
103 | %attr(755,root,root) %{_bindir}/kmk_install | |
104 | %attr(755,root,root) %{_bindir}/kmk_ln | |
105 | %attr(755,root,root) %{_bindir}/kmk_md5sum | |
106 | %attr(755,root,root) %{_bindir}/kmk_mkdir | |
107 | %attr(755,root,root) %{_bindir}/kmk_mv | |
108 | %attr(755,root,root) %{_bindir}/kmk_printf | |
109 | %attr(755,root,root) %{_bindir}/kmk_redirect | |
110 | %attr(755,root,root) %{_bindir}/kmk_rm | |
111 | %attr(755,root,root) %{_bindir}/kmk_rmdir | |
112 | %attr(755,root,root) %{_bindir}/kmk_sed | |
113 | %attr(755,root,root) %{_bindir}/kmk_sleep | |
114 | %attr(755,root,root) %{_bindir}/kmk_test | |
115 | %attr(755,root,root) %{_bindir}/kmk_time | |
116 | %dir %{_datadir}/%{name} | |
117 | %{_datadir}/%{name}/*.kmk | |
118 | %dir %{_datadir}/%{name}/msgstyles | |
119 | %{_datadir}/%{name}/msgstyles/*.kmk | |
120 | %dir %{_datadir}/%{name}/sdks | |
121 | %{_datadir}/%{name}/sdks/*.kmk | |
122 | %dir %{_datadir}/%{name}/templates | |
123 | %{_datadir}/%{name}/templates/*.kmk | |
124 | %dir %{_datadir}/%{name}/tools | |
125 | %{_datadir}/%{name}/tools/*.kmk | |
126 | %dir %{_datadir}/%{name}/units | |
127 | %{_datadir}/%{name}/units/*.kmk |