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 The goals of the kBuild framework:
32 - Similar behavior across all supported platforms
33 - Flexibility, don't create unnecessary restrictions preventing ad-hoc
35 - Makefiles can be simple to write and maintain
36 - One configuration file for a subtree automatically included
37 - Target configuration templates as the primary mechanism for makefile
39 - Tools and SDKs for helping out the templates with flexibility
40 - Non-recursive makefile method by using sub-makefiles
48 # Remove prebuilt stuff
49 %{__rm} -r kBuild/bin/*
51 # The bootstrap would probably not be needed if we depended on ourselves,
52 # yet it is not guarranteed that new versions are compilable with older
53 # kmk versions, so with this we are on a safer side
54 find -name config.log -delete
57 %define bootstrap_mflags \\\
59 TOOL_GCC3_CC="%{__cc}" \\\
60 CFLAGS="%{rpmcflags}" \\\
62 KBUILD_VERSION_PATCH=999
64 %define mflags %{bootstrap_mflags} \\\
65 NIX_INSTALL_DIR=%{_prefix} \\\
66 BUILD_TYPE=release \\\
72 %{__aclocal} -I config
78 kBuild/env.sh --full \
79 %{__make} -f bootstrap.gmk %{bootstrap_mflags}
81 kBuild/env.sh kmk %{mflags} rebuild
84 rm -rf $RPM_BUILD_ROOT
85 export KBUILD_VERBOSE=2
86 kBuild/env.sh kmk %{mflags} install \
87 PATH_INS=$RPM_BUILD_ROOT
89 # These are included later in files section
90 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
93 rm -rf $RPM_BUILD_ROOT
96 %defattr(644,root,root,755)
97 %doc COPYING ChangeLog
98 %doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference*
99 %attr(755,root,root) %{_bindir}/kDepIDB
100 %attr(755,root,root) %{_bindir}/kDepObj
101 %attr(755,root,root) %{_bindir}/kDepPre
102 %attr(755,root,root) %{_bindir}/kObjCache
103 %attr(755,root,root) %{_bindir}/kmk
104 %attr(755,root,root) %{_bindir}/kmk_append
105 %attr(755,root,root) %{_bindir}/kmk_ash
106 %attr(755,root,root) %{_bindir}/kmk_cat
107 %attr(755,root,root) %{_bindir}/kmk_chmod
108 %attr(755,root,root) %{_bindir}/kmk_cmp
109 %attr(755,root,root) %{_bindir}/kmk_cp
110 %attr(755,root,root) %{_bindir}/kmk_echo
111 %attr(755,root,root) %{_bindir}/kmk_expr
112 %attr(755,root,root) %{_bindir}/kmk_gmake
113 %attr(755,root,root) %{_bindir}/kmk_install
114 %attr(755,root,root) %{_bindir}/kmk_ln
115 %attr(755,root,root) %{_bindir}/kmk_md5sum
116 %attr(755,root,root) %{_bindir}/kmk_mkdir
117 %attr(755,root,root) %{_bindir}/kmk_mv
118 %attr(755,root,root) %{_bindir}/kmk_printf
119 %attr(755,root,root) %{_bindir}/kmk_redirect
120 %attr(755,root,root) %{_bindir}/kmk_rm
121 %attr(755,root,root) %{_bindir}/kmk_rmdir
122 %attr(755,root,root) %{_bindir}/kmk_sed
123 %attr(755,root,root) %{_bindir}/kmk_sleep
124 %attr(755,root,root) %{_bindir}/kmk_test
125 %attr(755,root,root) %{_bindir}/kmk_time
126 %dir %{_datadir}/%{name}
127 %{_datadir}/%{name}/*.kmk
128 %dir %{_datadir}/%{name}/msgstyles
129 %{_datadir}/%{name}/msgstyles/*.kmk
130 %dir %{_datadir}/%{name}/sdks
131 %{_datadir}/%{name}/sdks/*.kmk
132 %dir %{_datadir}/%{name}/templates
133 %{_datadir}/%{name}/templates/*.kmk
134 %dir %{_datadir}/%{name}/tools
135 %{_datadir}/%{name}/tools/*.kmk
136 %dir %{_datadir}/%{name}/units
137 %{_datadir}/%{name}/units/*.kmk