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