2 Summary: A cross-platform build environment
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
23 BuildRequires: gettext-devel
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
31 It is used mainly to build VirtualBox OSE packages for RPM Fusion
40 # Remove prebuilt stuff
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
49 %define bootstrap_mflags %{_smp_mflags} \\\
50 CFLAGS="%{optflags}" \\\
52 KBUILD_VERSION_PATCH=999
54 %define mflags %{bootstrap_mflags} \\\
55 NIX_INSTALL_DIR=%{_prefix} \\\
56 BUILD_TYPE=release \\\
62 %{__aclocal} -I config
68 kBuild/env.sh --full \
69 %{__make} -f bootstrap.gmk %{bootstrap_mflags}
71 kBuild/env.sh kmk %{mflags} rebuild
74 rm -rf $RPM_BUILD_ROOT
75 export KBUILD_VERBOSE=2
76 kBuild/env.sh kmk %{mflags} install \
77 PATH_INS=$RPM_BUILD_ROOT
79 # These are included later in files section
80 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
83 rm -rf $RPM_BUILD_ROOT
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