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