]> git.pld-linux.org Git - SPECS.git/blob - kBuild.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / kBuild.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # build boostrap
4 %bcond_without  verbose         # disable verbose build
5
6 %define         ver     0.1.9998
7 %define         svnrev  3598
8 Summary:        A cross-platform build environment
9 Summary(pl.UTF-8):      Wieloplatformowe środowisko budowania
10 Name:           kBuild
11 Version:        %{ver}.%{svnrev}
12 Release:        1
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
21 Patch2:         x32.patch
22 Patch3:         %{name}-bison.patch
23 Patch4:         quote-defs.patch
24 URL:            http://svn.netlabs.org/kbuild
25 BuildRequires:  acl-devel
26 BuildRequires:  bison
27 BuildRequires:  flex
28 %if %{with bootstrap}
29 BuildRequires:  autoconf >= 2.59
30 BuildRequires:  automake >= 1:1.9
31 BuildRequires:  gettext-tools >= 0.14
32 BuildRequires:  texinfo >= 4.0
33 %else
34 BuildRequires:  kBuild
35 %endif
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %ifarch %{x8664} x32
39 %define         kbuild_arch     amd64
40 %else
41 %define         kbuild_arch     x86
42 %endif
43
44 %description
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.
48
49 The goals of the kBuild framework:
50 - Similar behavior across all supported platforms
51 - Flexibility, don't create unnecessary restrictions preventing ad-hoc
52   solutions
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
56   simplification
57 - Tools and SDKs for helping out the templates with flexibility
58 - Non-recursive makefile method by using sub-makefiles
59
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.
64
65 Cele środowiska kBuild to:
66 - podobne zachowanie na wszystkich obsługiwanych platformach
67 - elastyczność, unikanie niepotrzebnych ograniczeń blokujących
68   rozwiązania doraźne
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
72   pliki Makefile
73 - narzędzia i SDK wspomagające szablony elastycznością
74 - nierekurencyjny system wykorzystujący podpliki Makefile
75
76 %prep
77 %setup -qc
78 mv %{name} .tmp; mv .tmp/* .
79 %patch0 -p1
80 %patch1 -p1
81 %patch2 -p1
82 %patch3 -p1
83 %patch4 -p1
84
85 cat > SvnInfo.kmk << EOF
86 KBUILD_SVN_REV := %{svnrev}
87 KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
88 EOF
89
90 %{__sed} -i -e 's@_LDFLAGS\.%{kbuild_arch}*.*=@& %{rpmldflags}@g' Config.kmk
91
92 %ifarch x32
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
97 %endif
98
99 %build
100 %define bootstrap_mflags %{?_smp_mflags} %{?with_verbose:KBUILD_VERBOSE=2} \\\
101                 CC="%{__cc}" TOOL_GCC3_CC="%{__cc}" CFLAGS="%{rpmcflags}"
102
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
108
109 ver=$(awk '/^KBUILD_VERSION =/{print $3}' Config.kmk)
110 test "$ver" = %{ver}
111
112 %if %{with bootstrap}
113 cd src/kmk
114 %{__aclocal} -I config
115 %{__autoconf}
116 %{__autoheader}
117 %{__automake}
118 cd ../sed
119 %{__gettextize}
120 %{__aclocal} -I config
121 %{__autoconf}
122 %{__autoheader}
123 %{__automake}
124 cd ../..
125
126 kBuild/env.sh --full \
127         %{__make} -f bootstrap.gmk %{bootstrap_mflags} \
128                 AUTORECONF=:
129
130 kBuild/env.sh kmk clean
131 %endif
132
133 kBuild/env.sh kmk %{mflags} all \
134         PATH_INS=$RPM_BUILD_ROOT
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 kBuild/env.sh kmk %{mflags} install \
139         PATH_INS=$RPM_BUILD_ROOT
140
141 # These are included later in files section
142 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %files
148 %defattr(644,root,root,755)
149 %doc ChangeLog
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
This page took 1.268914 seconds and 3 git commands to generate.