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