3 %bcond_with bootstrap # build boostrap
4 %bcond_without verbose # disable verbose build
8 Summary: A cross-platform build environment
9 Summary(pl.UTF-8): Wieloplatformowe środowisko budowania
11 Version: %{ver}.%{svnrev}
13 Group: Development/Tools
14 # Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU
15 License: BSD and GPL v2+
16 Source0: %{name}-r%{svnrev}.tar.bz2
17 # Source0-md5: 7c394fbe248f903d0bc1aabd235dc0a9
18 Source1: get-source.sh
19 Patch0: %{name}-0.1.3-escape.patch
20 Patch1: %{name}-0.1.5-dprintf.patch
21 Patch2: %{name}-0.1.5-pthread.patch
22 Patch3: re_string_fetch_byte_case-not-pure-attribute.patch
24 Patch5: %{name}-bison.patch
25 URL: http://svn.netlabs.org/kbuild
26 BuildRequires: acl-devel
30 BuildRequires: autoconf >= 2.59
31 BuildRequires: automake >= 1:1.9
32 BuildRequires: gettext-tools >= 0.14
33 BuildRequires: texinfo >= 4.0
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define kbuild_arch amd64
42 %define kbuild_arch x86
46 This is a GNU make fork with a set of scripts to simplify complex
47 tasks and portable versions of various UNIX tools to ensure
48 cross-platform portability.
50 The goals of the kBuild framework:
51 - Similar behavior across all supported platforms
52 - Flexibility, don't create unnecessary restrictions preventing ad-hoc
54 - Makefiles can be simple to write and maintain
55 - One configuration file for a subtree automatically included
56 - Target configuration templates as the primary mechanism for makefile
58 - Tools and SDKs for helping out the templates with flexibility
59 - Non-recursive makefile method by using sub-makefiles
61 %description -l pl.UTF-8
62 Ten pakiet to odgałęzienie GNU make'a wraz z zestawem skryptów
63 upraszczających złożone zadania oraz przenośnych wersji różnych
64 narzędzi uniksowych w celu zapewnienia przenośności na wiele platform.
66 Cele środowiska kBuild to:
67 - podobne zachowanie na wszystkich obsługiwanych platformach
68 - elastyczność, unikanie niepotrzebnych ograniczeń blokujących
70 - proste do napisania i utrzymania pliki Makefile
71 - automatyczne dołączanie jednego pliku konfiguracyjnego na poddrzewo
72 - szablony konfiguracji docelowej jako główny mechanizm upraszczający
74 - narzędzia i SDK wspomagające szablony elastycznością
75 - nierekurencyjny system wykorzystujący podpliki Makefile
79 mv %{name} .tmp; mv .tmp/* .
87 cat > SvnInfo.kmk << EOF
88 KBUILD_SVN_REV := %{svnrev}
89 KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
92 %{__sed} -i -e 's@_LDFLAGS\.%{kbuild_arch}*.*=@& %{rpmldflags}@g' Config.kmk
95 # probably should add full x32 configuration
96 # but can't find place to submit code upstream, so this will do for now.
97 # but then again, forcing -m64 is bad and pointless
98 sed -i -e 's/-m64//' kBuild/tools/GCC64.kmk kBuild/tools/GXX64.kmk tests/Config.kmk Config.kmk
102 %define bootstrap_mflags %{?_smp_mflags} %{?with_verbose:KBUILD_VERBOSE=2} \\\
103 CC="%{__cc}" TOOL_GCC3_CC="%{__cc}" CFLAGS="%{rpmcflags}"
105 %define mflags %{bootstrap_mflags} \\\
106 NIX_INSTALL_DIR=%{_prefix} \\\
107 BUILD_TYPE=release \\\
108 MY_INST_MODE=0644 \\\
109 MY_INST_BIN_MODE=0755
111 ver=$(awk '/^KBUILD_VERSION =/{print $3}' Config.kmk)
114 %if %{with bootstrap}
116 %{__aclocal} -I config
122 %{__aclocal} -I config
128 kBuild/env.sh --full \
129 %{__make} -f bootstrap.gmk %{bootstrap_mflags} \
132 kBuild/env.sh kmk clean
135 kBuild/env.sh kmk %{mflags} all \
136 PATH_INS=$RPM_BUILD_ROOT
139 rm -rf $RPM_BUILD_ROOT
140 kBuild/env.sh kmk %{mflags} install \
141 PATH_INS=$RPM_BUILD_ROOT
143 # These are included later in files section
144 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
147 rm -rf $RPM_BUILD_ROOT
150 %defattr(644,root,root,755)
152 %doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference*
153 %attr(755,root,root) %{_bindir}/kDepIDB
154 %attr(755,root,root) %{_bindir}/kDepObj
155 %attr(755,root,root) %{_bindir}/kDepPre
156 %attr(755,root,root) %{_bindir}/kObjCache
157 %attr(755,root,root) %{_bindir}/kmk
158 %attr(755,root,root) %{_bindir}/kmk_append
159 %attr(755,root,root) %{_bindir}/kmk_ash
160 %attr(755,root,root) %{_bindir}/kmk_cat
161 %attr(755,root,root) %{_bindir}/kmk_chmod
162 %attr(755,root,root) %{_bindir}/kmk_cmp
163 %attr(755,root,root) %{_bindir}/kmk_cp
164 %attr(755,root,root) %{_bindir}/kmk_echo
165 %attr(755,root,root) %{_bindir}/kmk_expr
166 %attr(755,root,root) %{_bindir}/kmk_gmake
167 %attr(755,root,root) %{_bindir}/kmk_install
168 %attr(755,root,root) %{_bindir}/kmk_ln
169 %attr(755,root,root) %{_bindir}/kmk_md5sum
170 %attr(755,root,root) %{_bindir}/kmk_mkdir
171 %attr(755,root,root) %{_bindir}/kmk_mv
172 %attr(755,root,root) %{_bindir}/kmk_printf
173 %attr(755,root,root) %{_bindir}/kmk_redirect
174 %attr(755,root,root) %{_bindir}/kmk_rm
175 %attr(755,root,root) %{_bindir}/kmk_rmdir
176 %attr(755,root,root) %{_bindir}/kmk_sed
177 %attr(755,root,root) %{_bindir}/kmk_sleep
178 %attr(755,root,root) %{_bindir}/kmk_test
179 %attr(755,root,root) %{_bindir}/kmk_time
180 %dir %{_datadir}/%{name}
181 %{_datadir}/%{name}/*.kmk
182 %dir %{_datadir}/%{name}/msgstyles
183 %{_datadir}/%{name}/msgstyles/*.kmk
184 %dir %{_datadir}/%{name}/sdks
185 %{_datadir}/%{name}/sdks/*.kmk
186 %dir %{_datadir}/%{name}/templates
187 %{_datadir}/%{name}/templates/*.kmk
188 %dir %{_datadir}/%{name}/tools
189 %{_datadir}/%{name}/tools/*.kmk
190 %dir %{_datadir}/%{name}/units
191 %{_datadir}/%{name}/units/*.kmk