3 Summary: A cross-platform build environment
6 Release: 3%{?patchlevel:.%{patchlevel}}
7 Group: Development/Tools
8 # Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU
9 License: BSD and GPL v2+
10 URL: http://svn.netlabs.org/kbuild
11 #Source0: ftp://ftp.netlabs.org/pub/kbuild/%{name}-%{version}%{?patchlevel:-%{patchlevel}}-src.tar.gz
12 # svn co -e2537 http://svn.netlabs.org/repos/kbuild/trunk@2537 kBuild
13 # tar czf kBuild-r2537.tar.gz --exclude .svn kBuild
14 Source0: %{name}-r%{svnrev}.tar.gz
15 # Source0-md5: 4890acabce44bb9c94f1211eca1c135c
16 Patch0: %{name}-0.1.3-escape.patch
17 Patch1: %{name}-0.1.5-dprintf.patch
18 Patch2: %{name}-0.1.5-pthread.patch
19 BuildRequires: acl-devel
20 BuildRequires: autoconf
21 BuildRequires: automake
25 BuildRequires: gettext-devel
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This is a GNU make fork with a set of scripts to simplify complex
30 tasks and portable versions of various UNIX tools to ensure
31 cross-platform portability.
33 The goals of the kBuild framework:
34 - Similar behavior across all supported platforms
35 - Flexibility, don't create unnecessary restrictions preventing ad-hoc
37 - Makefiles can be simple to write and maintain
38 - One configuration file for a subtree automatically included
39 - Target configuration templates as the primary mechanism for makefile
41 - Tools and SDKs for helping out the templates with flexibility
42 - Non-recursive makefile method by using sub-makefiles
50 # Remove prebuilt stuff
51 %{__rm} -r kBuild/bin/*
53 cat > SvnInfo.kmk << EOF
54 KBUILD_SVN_REV := %{svnrev}
55 KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
58 # The bootstrap would probably not be needed if we depended on ourselves,
59 # yet it is not guarranteed that new versions are compilable with older
60 # kmk versions, so with this we are on a safer side
61 find -name config.log -delete
64 %define bootstrap_mflags \\\
66 TOOL_GCC3_CC="%{__cc}" \\\
67 CFLAGS="%{rpmcflags}" \\\
69 KBUILD_VERSION_PATCH=999
71 %define mflags %{bootstrap_mflags} \\\
72 NIX_INSTALL_DIR=%{_prefix} \\\
73 BUILD_TYPE=release \\\
79 %{__aclocal} -I config
85 kBuild/env.sh --full \
86 %{__make} -f bootstrap.gmk %{bootstrap_mflags}
88 kBuild/env.sh kmk %{mflags} rebuild
91 rm -rf $RPM_BUILD_ROOT
92 export KBUILD_VERBOSE=2
93 kBuild/env.sh kmk %{mflags} install \
94 PATH_INS=$RPM_BUILD_ROOT
96 # These are included later in files section
97 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
100 rm -rf $RPM_BUILD_ROOT
103 %defattr(644,root,root,755)
104 %doc COPYING ChangeLog
105 %doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference*
106 %attr(755,root,root) %{_bindir}/kDepIDB
107 %attr(755,root,root) %{_bindir}/kDepObj
108 %attr(755,root,root) %{_bindir}/kDepPre
109 %attr(755,root,root) %{_bindir}/kObjCache
110 %attr(755,root,root) %{_bindir}/kmk
111 %attr(755,root,root) %{_bindir}/kmk_append
112 %attr(755,root,root) %{_bindir}/kmk_ash
113 %attr(755,root,root) %{_bindir}/kmk_cat
114 %attr(755,root,root) %{_bindir}/kmk_chmod
115 %attr(755,root,root) %{_bindir}/kmk_cmp
116 %attr(755,root,root) %{_bindir}/kmk_cp
117 %attr(755,root,root) %{_bindir}/kmk_echo
118 %attr(755,root,root) %{_bindir}/kmk_expr
119 %attr(755,root,root) %{_bindir}/kmk_gmake
120 %attr(755,root,root) %{_bindir}/kmk_install
121 %attr(755,root,root) %{_bindir}/kmk_ln
122 %attr(755,root,root) %{_bindir}/kmk_md5sum
123 %attr(755,root,root) %{_bindir}/kmk_mkdir
124 %attr(755,root,root) %{_bindir}/kmk_mv
125 %attr(755,root,root) %{_bindir}/kmk_printf
126 %attr(755,root,root) %{_bindir}/kmk_redirect
127 %attr(755,root,root) %{_bindir}/kmk_rm
128 %attr(755,root,root) %{_bindir}/kmk_rmdir
129 %attr(755,root,root) %{_bindir}/kmk_sed
130 %attr(755,root,root) %{_bindir}/kmk_sleep
131 %attr(755,root,root) %{_bindir}/kmk_test
132 %attr(755,root,root) %{_bindir}/kmk_time
133 %dir %{_datadir}/%{name}
134 %{_datadir}/%{name}/*.kmk
135 %dir %{_datadir}/%{name}/msgstyles
136 %{_datadir}/%{name}/msgstyles/*.kmk
137 %dir %{_datadir}/%{name}/sdks
138 %{_datadir}/%{name}/sdks/*.kmk
139 %dir %{_datadir}/%{name}/templates
140 %{_datadir}/%{name}/templates/*.kmk
141 %dir %{_datadir}/%{name}/tools
142 %{_datadir}/%{name}/tools/*.kmk
143 %dir %{_datadir}/%{name}/units
144 %{_datadir}/%{name}/units/*.kmk