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: 902991c327b2cc93cc6da642e70a08e2
18 Source1: get-source.sh
19 Patch0: %{name}-0.1.3-escape.patch
20 Patch1: %{name}-0.1.5-pthread.patch
22 Patch3: %{name}-bison.patch
23 Patch4: quote-defs.patch
24 URL: http://svn.netlabs.org/kbuild
25 BuildRequires: acl-devel
29 BuildRequires: autoconf >= 2.59
30 BuildRequires: automake >= 1:1.9
31 BuildRequires: gettext-tools >= 0.14
32 BuildRequires: texinfo >= 4.0
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define kbuild_arch amd64
41 %define kbuild_arch x86
45 This is a GNU make fork with a set of scripts to simplify complex
46 tasks and portable versions of various UNIX tools to ensure
47 cross-platform portability.
49 The goals of the kBuild framework:
50 - Similar behavior across all supported platforms
51 - Flexibility, don't create unnecessary restrictions preventing ad-hoc
53 - Makefiles can be simple to write and maintain
54 - One configuration file for a subtree automatically included
55 - Target configuration templates as the primary mechanism for makefile
57 - Tools and SDKs for helping out the templates with flexibility
58 - Non-recursive makefile method by using sub-makefiles
60 %description -l pl.UTF-8
61 Ten pakiet to odgałęzienie GNU make'a wraz z zestawem skryptów
62 upraszczających złożone zadania oraz przenośnych wersji różnych
63 narzędzi uniksowych w celu zapewnienia przenośności na wiele platform.
65 Cele środowiska kBuild to:
66 - podobne zachowanie na wszystkich obsługiwanych platformach
67 - elastyczność, unikanie niepotrzebnych ograniczeń blokujących
69 - proste do napisania i utrzymania pliki Makefile
70 - automatyczne dołączanie jednego pliku konfiguracyjnego na poddrzewo
71 - szablony konfiguracji docelowej jako główny mechanizm upraszczający
73 - narzędzia i SDK wspomagające szablony elastycznością
74 - nierekurencyjny system wykorzystujący podpliki Makefile
78 mv %{name} .tmp; mv .tmp/* .
85 cat > SvnInfo.kmk << EOF
86 KBUILD_SVN_REV := %{svnrev}
87 KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
90 %{__sed} -i -e 's@_LDFLAGS\.%{kbuild_arch}*.*=@& %{rpmldflags}@g' Config.kmk
93 # probably should add full x32 configuration
94 # but can't find place to submit code upstream, so this will do for now.
95 # but then again, forcing -m64 is bad and pointless
96 sed -i -e 's/-m64//' kBuild/tools/GCC64.kmk kBuild/tools/GXX64.kmk tests/Config.kmk Config.kmk
100 %define bootstrap_mflags %{?_smp_mflags} %{?with_verbose:KBUILD_VERBOSE=2} \\\
101 CC="%{__cc}" TOOL_GCC3_CC="%{__cc}" CFLAGS="%{rpmcflags}"
103 %define mflags %{bootstrap_mflags} \\\
104 NIX_INSTALL_DIR=%{_prefix} \\\
105 BUILD_TYPE=release \\\
106 MY_INST_MODE=0644 \\\
107 MY_INST_BIN_MODE=0755
109 ver=$(awk '/^KBUILD_VERSION =/{print $3}' Config.kmk)
112 %if %{with bootstrap}
114 %{__aclocal} -I config
120 %{__aclocal} -I config
126 kBuild/env.sh --full \
127 %{__make} -f bootstrap.gmk %{bootstrap_mflags} \
130 kBuild/env.sh kmk clean
133 kBuild/env.sh kmk %{mflags} all \
134 PATH_INS=$RPM_BUILD_ROOT
137 rm -rf $RPM_BUILD_ROOT
138 kBuild/env.sh kmk %{mflags} install \
139 PATH_INS=$RPM_BUILD_ROOT
141 # These are included later in files section
142 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
145 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
150 %doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference*
151 %attr(755,root,root) %{_bindir}/bld_signames
152 %attr(755,root,root) %{_bindir}/kDepIDB
153 %attr(755,root,root) %{_bindir}/kDepObj
154 %attr(755,root,root) %{_bindir}/kDepPre
155 %attr(755,root,root) %{_bindir}/kObjCache
156 %attr(755,root,root) %{_bindir}/kmk
157 %attr(755,root,root) %{_bindir}/kmk_append
158 %attr(755,root,root) %{_bindir}/kmk_ash
159 %attr(755,root,root) %{_bindir}/kmk_cat
160 %attr(755,root,root) %{_bindir}/kmk_chmod
161 %attr(755,root,root) %{_bindir}/kmk_cmp
162 %attr(755,root,root) %{_bindir}/kmk_cp
163 %attr(755,root,root) %{_bindir}/kmk_echo
164 %attr(755,root,root) %{_bindir}/kmk_expr
165 %attr(755,root,root) %{_bindir}/kmk_gmake
166 %attr(755,root,root) %{_bindir}/kmk_install
167 %attr(755,root,root) %{_bindir}/kmk_ln
168 %attr(755,root,root) %{_bindir}/kmk_md5sum
169 %attr(755,root,root) %{_bindir}/kmk_mkdir
170 %attr(755,root,root) %{_bindir}/kmk_mv
171 %attr(755,root,root) %{_bindir}/kmk_printf
172 %attr(755,root,root) %{_bindir}/kmk_redirect
173 %attr(755,root,root) %{_bindir}/kmk_rm
174 %attr(755,root,root) %{_bindir}/kmk_rmdir
175 %attr(755,root,root) %{_bindir}/kmk_sed
176 %attr(755,root,root) %{_bindir}/kmk_sleep
177 %attr(755,root,root) %{_bindir}/kmk_test
178 %attr(755,root,root) %{_bindir}/kmk_time
179 %attr(755,root,root) %{_bindir}/kmk_touch
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