]> git.pld-linux.org Git - packages/kBuild.git/blame - kBuild.spec
fix url order
[packages/kBuild.git] / kBuild.spec
CommitLineData
03adcd7a
ER
1#
2# Conditional build:
3%bcond_with bootstrap # build boostrap
e6257564 4%bcond_without verbose # disable verbose build
03adcd7a 5
67809d62
JR
6%define ver 0.1.9998
7%define svnrev 2700
7395c18c
ER
8Summary: A cross-platform build environment
9Name: kBuild
67809d62 10Version: %{ver}.%{svnrev}
7ea8a9f9 11Release: 2
7395c18c
ER
12Group: Development/Tools
13# Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU
14License: BSD and GPL v2+
937b464e 15Source0: %{name}-r%{svnrev}.tar.bz2
67809d62 16# Source0-md5: 7c394fbe248f903d0bc1aabd235dc0a9
937b464e 17Source1: get-source.sh
7395c18c
ER
18Patch0: %{name}-0.1.3-escape.patch
19Patch1: %{name}-0.1.5-dprintf.patch
20Patch2: %{name}-0.1.5-pthread.patch
3ae532bd 21Patch3: re_string_fetch_byte_case-not-pure-attribute.patch
6e59f9ac 22URL: http://svn.netlabs.org/kbuild
7395c18c 23BuildRequires: acl-devel
7395c18c 24BuildRequires: byacc
7395c18c 25BuildRequires: flex
52eeae26
ER
26%if %{with bootstrap}
27BuildRequires: autoconf
28BuildRequires: automake
afb28ddd 29BuildRequires: gettext-autopoint
52eeae26
ER
30BuildRequires: libtool
31BuildRequires: texinfo
32%else
33BuildRequires: kBuild
34%endif
7395c18c
ER
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
937b464e
ER
37%ifarch %{x8664}
38%define kbuild_arch amd64
39%else
40%define kbuild_arch x86
41%endif
42
7395c18c
ER
43%description
44This is a GNU make fork with a set of scripts to simplify complex
45tasks and portable versions of various UNIX tools to ensure
46cross-platform portability.
47
d10babce 48The goals of the kBuild framework:
77f5dc2f 49- Similar behavior across all supported platforms
d10babce
ER
50- Flexibility, don't create unnecessary restrictions preventing ad-hoc
51 solutions
52- Makefiles can be simple to write and maintain
53- One configuration file for a subtree automatically included
54- Target configuration templates as the primary mechanism for makefile
55 simplification
56- Tools and SDKs for helping out the templates with flexibility
57- Non-recursive makefile method by using sub-makefiles
7395c18c
ER
58
59%prep
d4a5e87a
ER
60%setup -qc
61mv %{name} .tmp; mv .tmp/* .
7395c18c
ER
62%patch0 -p1
63%patch1 -p1
64%patch2 -p1
3ae532bd 65%patch3 -p1
7395c18c 66
253d6e7b
ER
67cat > SvnInfo.kmk << EOF
68KBUILD_SVN_REV := %{svnrev}
69KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
70EOF
71
937b464e
ER
72%{__sed} -i -e 's@_LDFLAGS\.%{kbuild_arch}*.*=@& %{rpmldflags}@g' Config.kmk
73
7395c18c 74%build
e6257564
ER
75%define bootstrap_mflags %{?_smp_mflags} %{?with_verbose:KBUILD_VERBOSE=2} \\\
76 CC="%{__cc}" TOOL_GCC3_CC="%{__cc}" CFLAGS="%{rpmcflags}"
77
78%define mflags %{bootstrap_mflags} \\\
79 NIX_INSTALL_DIR=%{_prefix} \\\
80 BUILD_TYPE=release \\\
81 MY_INST_MODE=0644 \\\
7395c18c
ER
82 MY_INST_BIN_MODE=0755
83
03adcd7a 84ver=$(awk '/^KBUILD_VERSION =/{print $3}' Config.kmk)
67809d62 85test "$ver" = %{ver}
03adcd7a 86
e6257564 87%if %{with bootstrap}
7395c18c
ER
88cd src/kmk
89%{__libtoolize}
90%{__aclocal} -I config
91%{__autoconf}
92%{__autoheader}
93%{__automake}
937b464e
ER
94cd ../sed
95%{__libtoolize}
96%{__aclocal} -I config
97%{__autoconf}
98%{__autoheader}
99%{__automake}
100cd ../..
7395c18c
ER
101
102kBuild/env.sh --full \
103 %{__make} -f bootstrap.gmk %{bootstrap_mflags}
e6257564
ER
104
105kBuild/env.sh kmk clean
03adcd7a 106%endif
7395c18c 107
e6257564
ER
108kBuild/env.sh kmk %{mflags} all \
109 PATH_INS=$RPM_BUILD_ROOT
7395c18c
ER
110
111%install
112rm -rf $RPM_BUILD_ROOT
7395c18c
ER
113kBuild/env.sh kmk %{mflags} install \
114 PATH_INS=$RPM_BUILD_ROOT
115
116# These are included later in files section
117%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%files
123%defattr(644,root,root,755)
776fed43 124%doc ChangeLog
7395c18c
ER
125%doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference*
126%attr(755,root,root) %{_bindir}/kDepIDB
127%attr(755,root,root) %{_bindir}/kDepObj
128%attr(755,root,root) %{_bindir}/kDepPre
129%attr(755,root,root) %{_bindir}/kObjCache
130%attr(755,root,root) %{_bindir}/kmk
131%attr(755,root,root) %{_bindir}/kmk_append
132%attr(755,root,root) %{_bindir}/kmk_ash
133%attr(755,root,root) %{_bindir}/kmk_cat
134%attr(755,root,root) %{_bindir}/kmk_chmod
135%attr(755,root,root) %{_bindir}/kmk_cmp
136%attr(755,root,root) %{_bindir}/kmk_cp
137%attr(755,root,root) %{_bindir}/kmk_echo
138%attr(755,root,root) %{_bindir}/kmk_expr
139%attr(755,root,root) %{_bindir}/kmk_gmake
140%attr(755,root,root) %{_bindir}/kmk_install
141%attr(755,root,root) %{_bindir}/kmk_ln
142%attr(755,root,root) %{_bindir}/kmk_md5sum
143%attr(755,root,root) %{_bindir}/kmk_mkdir
144%attr(755,root,root) %{_bindir}/kmk_mv
145%attr(755,root,root) %{_bindir}/kmk_printf
146%attr(755,root,root) %{_bindir}/kmk_redirect
147%attr(755,root,root) %{_bindir}/kmk_rm
148%attr(755,root,root) %{_bindir}/kmk_rmdir
149%attr(755,root,root) %{_bindir}/kmk_sed
150%attr(755,root,root) %{_bindir}/kmk_sleep
151%attr(755,root,root) %{_bindir}/kmk_test
152%attr(755,root,root) %{_bindir}/kmk_time
153%dir %{_datadir}/%{name}
154%{_datadir}/%{name}/*.kmk
155%dir %{_datadir}/%{name}/msgstyles
156%{_datadir}/%{name}/msgstyles/*.kmk
157%dir %{_datadir}/%{name}/sdks
158%{_datadir}/%{name}/sdks/*.kmk
159%dir %{_datadir}/%{name}/templates
160%{_datadir}/%{name}/templates/*.kmk
161%dir %{_datadir}/%{name}/tools
162%{_datadir}/%{name}/tools/*.kmk
163%dir %{_datadir}/%{name}/units
164%{_datadir}/%{name}/units/*.kmk
This page took 0.116729 seconds and 4 git commands to generate.