]> git.pld-linux.org Git - packages/kBuild.git/blob - kBuild.spec
run parallel jobs
[packages/kBuild.git] / kBuild.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap               # build boostrap
4
5 %define         svnrev 2537
6 Summary:        A cross-platform build environment
7 Name:           kBuild
8 Version:        0.1.999
9 Release:        1
10 Group:          Development/Tools
11 # Most tools are from NetBSD, some are from FreeBSD, and make and sed are from GNU
12 License:        BSD and GPL v2+
13 URL:            http://svn.netlabs.org/kbuild
14 #Source0:        ftp://ftp.netlabs.org/pub/kbuild/%{name}-%{version}%{?patchlevel:-%{patchlevel}}-src.tar.gz
15 # svn co -e2537 http://svn.netlabs.org/repos/kbuild/trunk@2537 kBuild
16 # tar czf kBuild-r2537.tar.gz --exclude .svn kBuild
17 Source0:        %{name}-r%{svnrev}.tar.gz
18 # Source0-md5:  4890acabce44bb9c94f1211eca1c135c
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 BuildRequires:  acl-devel
23 %{!?with_bootstrap:BuildRequires:       kBuild}
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 BuildRequires:  byacc
27 BuildRequires:  cvs
28 BuildRequires:  flex
29 BuildRequires:  gettext-devel
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 This is a GNU make fork with a set of scripts to simplify complex
34 tasks and portable versions of various UNIX tools to ensure
35 cross-platform portability.
36
37 The goals of the kBuild framework:
38  - Similar behavior across all supported platforms
39 - Flexibility, don't create unnecessary restrictions preventing ad-hoc
40   solutions
41 - Makefiles can be simple to write and maintain
42 - One configuration file for a subtree automatically included
43 - Target configuration templates as the primary mechanism for makefile
44   simplification
45 - Tools and SDKs for helping out the templates with flexibility
46 - Non-recursive makefile method by using sub-makefiles
47
48 %prep
49 %setup -q -n %{name}
50 %patch0 -p1
51 %patch1 -p1
52 %patch2 -p1
53
54 # Remove prebuilt stuff
55 %{__rm} -r kBuild/bin/*
56
57 cat > SvnInfo.kmk << EOF
58 KBUILD_SVN_REV := %{svnrev}
59 KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
60 EOF
61
62 %build
63 %define bootstrap_mflags %{?_smp_mflags} \\\
64                 CC="%{__cc}" \\\
65                 TOOL_GCC3_CC="%{__cc}" \\\
66                 CFLAGS="%{rpmcflags}"                   \\\
67                 KBUILD_VERBOSE=2                                \\\
68                 KBUILD_VERSION_PATCH=999
69
70 %define mflags %{bootstrap_mflags}      \\\
71                 NIX_INSTALL_DIR=%{_prefix}        \\\
72                 BUILD_TYPE=release                        \\\
73                 MY_INST_MODE=0644                          \\\
74                 MY_INST_BIN_MODE=0755
75
76 ver=$(awk '/^KBUILD_VERSION =/{print $3}' Config.kmk)
77 test "$ver" = %{version}
78
79 cd src/kmk
80 %{__libtoolize}
81 %{__aclocal} -I config
82 %{__autoconf}
83 %{__autoheader}
84 %{__automake}
85 cd -
86
87 %if %{with bootstrap}
88 kBuild/env.sh --full \
89         %{__make} -f bootstrap.gmk %{bootstrap_mflags}
90 %endif
91
92 kBuild/env.sh kmk %{mflags} rebuild
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 export KBUILD_VERBOSE=2
97 kBuild/env.sh kmk %{mflags} install \
98         PATH_INS=$RPM_BUILD_ROOT
99
100 # These are included later in files section
101 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %files
107 %defattr(644,root,root,755)
108 %doc ChangeLog
109 %doc kBuild/doc/COPYING-FDL-1.3 kBuild/doc/QuickReference*
110 %attr(755,root,root) %{_bindir}/kDepIDB
111 %attr(755,root,root) %{_bindir}/kDepObj
112 %attr(755,root,root) %{_bindir}/kDepPre
113 %attr(755,root,root) %{_bindir}/kObjCache
114 %attr(755,root,root) %{_bindir}/kmk
115 %attr(755,root,root) %{_bindir}/kmk_append
116 %attr(755,root,root) %{_bindir}/kmk_ash
117 %attr(755,root,root) %{_bindir}/kmk_cat
118 %attr(755,root,root) %{_bindir}/kmk_chmod
119 %attr(755,root,root) %{_bindir}/kmk_cmp
120 %attr(755,root,root) %{_bindir}/kmk_cp
121 %attr(755,root,root) %{_bindir}/kmk_echo
122 %attr(755,root,root) %{_bindir}/kmk_expr
123 %attr(755,root,root) %{_bindir}/kmk_gmake
124 %attr(755,root,root) %{_bindir}/kmk_install
125 %attr(755,root,root) %{_bindir}/kmk_ln
126 %attr(755,root,root) %{_bindir}/kmk_md5sum
127 %attr(755,root,root) %{_bindir}/kmk_mkdir
128 %attr(755,root,root) %{_bindir}/kmk_mv
129 %attr(755,root,root) %{_bindir}/kmk_printf
130 %attr(755,root,root) %{_bindir}/kmk_redirect
131 %attr(755,root,root) %{_bindir}/kmk_rm
132 %attr(755,root,root) %{_bindir}/kmk_rmdir
133 %attr(755,root,root) %{_bindir}/kmk_sed
134 %attr(755,root,root) %{_bindir}/kmk_sleep
135 %attr(755,root,root) %{_bindir}/kmk_test
136 %attr(755,root,root) %{_bindir}/kmk_time
137 %dir %{_datadir}/%{name}
138 %{_datadir}/%{name}/*.kmk
139 %dir %{_datadir}/%{name}/msgstyles
140 %{_datadir}/%{name}/msgstyles/*.kmk
141 %dir %{_datadir}/%{name}/sdks
142 %{_datadir}/%{name}/sdks/*.kmk
143 %dir %{_datadir}/%{name}/templates
144 %{_datadir}/%{name}/templates/*.kmk
145 %dir %{_datadir}/%{name}/tools
146 %{_datadir}/%{name}/tools/*.kmk
147 %dir %{_datadir}/%{name}/units
148 %{_datadir}/%{name}/units/*.kmk
This page took 0.061143 seconds and 4 git commands to generate.