| 1 | #
|
|---|
| 2 | # http://svn.netlabs.org/kbuild
|
|---|
| 3 | #
|
|---|
| 4 |
|
|---|
| 5 | Name: kbuild
|
|---|
| 6 | Vendor: netlabs.org
|
|---|
| 7 | License: BSD and GPLv2+
|
|---|
| 8 | Url: http://svn.netlabs.org/kbuild
|
|---|
| 9 |
|
|---|
| 10 | # Epoch is needed after dropping os2_release to keep proper updates.
|
|---|
| 11 | Epoch: 1
|
|---|
| 12 |
|
|---|
| 13 | Version: 0.1.9998
|
|---|
| 14 | Release: 8%{?dist}
|
|---|
| 15 |
|
|---|
| 16 | %define svn_url http://svn.netlabs.org/repos/kbuild/trunk
|
|---|
| 17 | %define svn_rev 2803
|
|---|
| 18 |
|
|---|
| 19 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 20 |
|
|---|
| 21 | BuildRequires: gcc make subversion zip
|
|---|
| 22 |
|
|---|
| 23 | %define descr_brief kBuild is a GNU Make fork with a set of scripts to simplify\
|
|---|
| 24 | complex build tasks and portable versions of various UNIX tools to ensure\
|
|---|
| 25 | cross-platform portability.
|
|---|
| 26 |
|
|---|
| 27 | %define pkg_docdir %{_docdir}/%{name}
|
|---|
| 28 |
|
|---|
| 29 | # Install DLLs to /bin rather than to /lib. Rejected upstream (#109).
|
|---|
| 30 | Patch1: kbuild-001-os2_default_inst_dll_to_bin.patch
|
|---|
| 31 | # Generate import libraries for DLL targets. Left w/o attention (#109).
|
|---|
| 32 | Patch5: kbuild-005-gcc3omf_gen_implib_for_dll.patch
|
|---|
| 33 | # Build with GCC4 (#124).
|
|---|
| 34 | Patch8: kbuild-008-gcc4.patch
|
|---|
| 35 | # Fix slashes in .rsp files for OpenWatcom (#125).
|
|---|
| 36 | Patch9: kbuild-009-OPENWATCOM_slashes.patch
|
|---|
| 37 | # Add major version suffix to Qt libs (#126).
|
|---|
| 38 | Patch10: kbuild-010-qt4_major_suff.patch
|
|---|
| 39 | # Fix unsetting env vars in kmk_redirect (#127).
|
|---|
| 40 | Patch11: kbuild-011-kmk_redirect.patch
|
|---|
| 41 |
|
|---|
| 42 | BuildRequires: kbuild gettext-devel
|
|---|
| 43 |
|
|---|
| 44 | #------------------------------------------------------------------------------
|
|---|
| 45 | # commons
|
|---|
| 46 | #------------------------------------------------------------------------------
|
|---|
| 47 |
|
|---|
| 48 | # TODO: patch -s (2.6.1-3.oc00) always fails, remove this flag from defaults
|
|---|
| 49 | %define _default_patch_flags %nil
|
|---|
| 50 |
|
|---|
| 51 | #------------------------------------------------------------------------------
|
|---|
| 52 | # main package
|
|---|
| 53 | #------------------------------------------------------------------------------
|
|---|
| 54 |
|
|---|
| 55 | Summary: Framework for writing simple makefiles for complex tasks
|
|---|
| 56 | Group: System Environment/Libraries
|
|---|
| 57 |
|
|---|
| 58 | %description
|
|---|
| 59 | %{descr_brief}
|
|---|
| 60 |
|
|---|
| 61 | %files
|
|---|
| 62 | %defattr(-,root,root,-)
|
|---|
| 63 | %docdir %{pkg_docdir}/
|
|---|
| 64 | %{_bindir}/*
|
|---|
| 65 | %exclude %{_bindir}/make.exe
|
|---|
| 66 | %{_datadir}/*
|
|---|
| 67 |
|
|---|
| 68 | #------------------------------------------------------------------------------
|
|---|
| 69 | %package make
|
|---|
| 70 | #------------------------------------------------------------------------------
|
|---|
| 71 |
|
|---|
| 72 | Summary: GNU Make 3.81 implementation based on kBuild's kmk
|
|---|
| 73 | Group: System Environment/Libraries
|
|---|
| 74 | Provides: make = 3.81
|
|---|
| 75 |
|
|---|
| 76 | %description make
|
|---|
| 77 | A GNU Make executable compiled from the kmk source tree. The kmk tool itself is
|
|---|
| 78 | a fork of GNU Make and this build just disables all kmk-specific features. It
|
|---|
| 79 | may also contain some minor GNU Make bugfixes not specific to kmk which are
|
|---|
| 80 | absent from the upstream version. However, this executable should be fully
|
|---|
| 81 | compatible with the vanilla GNU Make function-wise.
|
|---|
| 82 |
|
|---|
| 83 | %files make
|
|---|
| 84 | %defattr(-,root,root,-)
|
|---|
| 85 | %{_bindir}/make.exe
|
|---|
| 86 |
|
|---|
| 87 | #------------------------------------------------------------------------------
|
|---|
| 88 | %prep
|
|---|
| 89 | #------------------------------------------------------------------------------
|
|---|
| 90 |
|
|---|
| 91 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 92 | %setup -q
|
|---|
| 93 | %else
|
|---|
| 94 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 95 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 96 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 97 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 98 | %endif
|
|---|
| 99 |
|
|---|
| 100 | %patch1
|
|---|
| 101 | [ $? = 0 ] || exit 1
|
|---|
| 102 | %patch5
|
|---|
| 103 | [ $? = 0 ] || exit 1
|
|---|
| 104 | %patch8
|
|---|
| 105 | [ $? = 0 ] || exit 1
|
|---|
| 106 | %patch9
|
|---|
| 107 | [ $? = 0 ] || exit 1
|
|---|
| 108 | %patch10
|
|---|
| 109 | [ $? = 0 ] || exit 1
|
|---|
| 110 | %patch11
|
|---|
| 111 | [ $? = 0 ] || exit 1
|
|---|
| 112 |
|
|---|
| 113 | # Makefiles expect SVN info, generate it.
|
|---|
| 114 | echo \
|
|---|
| 115 | "KBUILD_SVN_URL := %{svn_url}@%{svn_rev}
|
|---|
| 116 | KBUILD_SVN_REV := %{svn_rev}
|
|---|
| 117 | " > SvnInfo.kmk
|
|---|
| 118 |
|
|---|
| 119 | #------------------------------------------------------------------------------
|
|---|
| 120 | %build
|
|---|
| 121 | #------------------------------------------------------------------------------
|
|---|
| 122 |
|
|---|
| 123 | # Note: we must remove the leading slash from path overrides, otherwise
|
|---|
| 124 | # kmk complains about that (kind of a strange bug-o-feature)
|
|---|
| 125 | %define kmk_env \
|
|---|
| 126 | MY_INST_BIN=%{_bindir} \
|
|---|
| 127 | MY_INST_DATA=%{_datadir}/kbuild \
|
|---|
| 128 | MY_INST_DOC=%{pkg_docdir} \
|
|---|
| 129 | KMK_FLAGS="\
|
|---|
| 130 | BUILD_TYPE=release \
|
|---|
| 131 | LDFLAGS=-lintl \
|
|---|
| 132 | NIX_INSTALL_DIR=%{_prefix} \
|
|---|
| 133 | MY_INST_BIN=${MY_INST_BIN#/}/ \
|
|---|
| 134 | MY_INST_DATA=${MY_INST_DATA#/}/ \
|
|---|
| 135 | MY_INST_DOC=${MY_INST_DOC#/}/ \
|
|---|
| 136 | MY_INST_MODE=0644 \
|
|---|
| 137 | MY_INST_BIN_MODE=0755" \
|
|---|
| 138 | BUILD_PLATFORM= \
|
|---|
| 139 |
|
|---|
| 140 | %{kmk_env}
|
|---|
| 141 |
|
|---|
| 142 | cmd /c "kBuild\envos2.cmd" kmk $KMK_FLAGS
|
|---|
| 143 |
|
|---|
| 144 | #------------------------------------------------------------------------------
|
|---|
| 145 | %install
|
|---|
| 146 | #------------------------------------------------------------------------------
|
|---|
| 147 |
|
|---|
| 148 | %{kmk_env}
|
|---|
| 149 |
|
|---|
| 150 | rm -rf "%{buildroot}"
|
|---|
| 151 |
|
|---|
| 152 | cmd /c "kBuild\envos2.cmd" kmk $KMK_FLAGS PATH_INS="%{buildroot}" install
|
|---|
| 153 |
|
|---|
| 154 | # We don't want LIBC*.DLL, there is a separate package for them
|
|---|
| 155 | rm "%{buildroot}%{_bindir}"/*.dll
|
|---|
| 156 |
|
|---|
| 157 | # Additional docs (not installed by install)
|
|---|
| 158 | cp -dp COPYING ChangeLog kBuild/doc/COPYING-FDL-1.3 "%{buildroot}%{pkg_docdir}/"
|
|---|
| 159 |
|
|---|
| 160 | # To make GNU Make we simply copy kmk_gmake.exe, this should be enough
|
|---|
| 161 | cp -dp "%{buildroot}%{_bindir}/kmk_gmake.exe" "%{buildroot}%{_bindir}/make.exe"
|
|---|
| 162 |
|
|---|
| 163 | #------------------------------------------------------------------------------
|
|---|
| 164 | %clean
|
|---|
| 165 | #------------------------------------------------------------------------------
|
|---|
| 166 |
|
|---|
| 167 | rm -rf "%{buildroot}"
|
|---|
| 168 |
|
|---|
| 169 | #------------------------------------------------------------------------------
|
|---|
| 170 | %changelog
|
|---|
| 171 |
|
|---|
| 172 | * Thu Dec 17 2015 Dmitriy Kuminov <coding@dmik.org> 0.1.9998-8
|
|---|
| 173 | - New SVN release 2803 of version 0.1.9998.
|
|---|
| 174 | - Fix slashes in .rsp files for OpenWatcom (#125).
|
|---|
| 175 | - Add major version suffix to Qt libs (#126).
|
|---|
| 176 | - Fix unsetting env vars in kmk_redirect (#127).
|
|---|
| 177 |
|
|---|
| 178 | * Wed Aug 05 2015 Dmitriy Kuminov <coding@dmik.org> 0.1.9998.7-1
|
|---|
| 179 | - New SVN release 2786 of version 0.1.9998.
|
|---|
| 180 | - Drop patches 2, 3 and 4 (applied upstream in r2774:2776).
|
|---|
| 181 | - Disable patch 7 claimed to be not necessary (see ticket #109).
|
|---|
| 182 | - Build with GCC 4 against LIBC 0.6.6 (patch 8, #124).
|
|---|
| 183 |
|
|---|
| 184 | * Thu Jul 11 2013 Dmitriy Kuminov <coding@dmik.org> 0.1.9998.6-1
|
|---|
| 185 | - New SVN release 2687 of version 0.1.9998.
|
|---|
| 186 | - Add kbuild-make package containing vanilla GNU Make executable.
|
|---|
| 187 |
|
|---|
| 188 | * Mon Nov 5 2012 Dmitriy Kuminov <coding/dmik.org> 0.1.9998.5-1
|
|---|
| 189 | - New patch:
|
|---|
| 190 | - Add switching between RC/WRC in GCC3OMF/GXX3OMF tools based on
|
|---|
| 191 | EMXOMFLD_RC_* environment variables [Patch6].
|
|---|
| 192 |
|
|---|
| 193 | * Mon Oct 16 2012 Dmitriy Kuminov <coding/dmik.org> 0.1.9998.4-1
|
|---|
| 194 | - New SVN release 2663 of version 0.1.9998.
|
|---|
| 195 |
|
|---|
| 196 | * Mon Oct 15 2012 Dmitriy Kuminov <coding/dmik.org> 0.1.9998.3-1
|
|---|
| 197 | - New SVN release 2662 of version 0.1.9998.
|
|---|
| 198 | - New patches:
|
|---|
| 199 | - Automatically create import library for DLL in GCC3OMF/GXX3OMF
|
|---|
| 200 | tools (may be disasbled with KMK_NOIMPLIB in LDFLAGS) [005.patch].
|
|---|
| 201 |
|
|---|
| 202 | * Fri Feb 10 2012 Dmitriy Kuminov <coding/dmik.org> 0.1.9998.2-1
|
|---|
| 203 | - New SVN release 2557 of version 0.1.9998.
|
|---|
| 204 | - New patches:
|
|---|
| 205 | - Install DLLs to "bin/" by default [001.patch].
|
|---|
| 206 | - Make ld and ar in GCC3OMF/GXX3OMF tools output obey KBUILD_VERBOSE
|
|---|
| 207 | setting and be quiet by default [002.patch].
|
|---|
| 208 | - Support DLLs as sources for LIBRARIES targets for making import
|
|---|
| 209 | libraries with GCC3OMF/GXX3OMF tools [003.patch].
|
|---|
| 210 | - Add RC support to GCC3OMF/GXX3OMF tools [004.patch].
|
|---|
| 211 |
|
|---|
| 212 | * Wed Oct 5 2011 Dmitriy Kuminov <coding/dmik.org> 0.1.9998.1-1
|
|---|
| 213 | - New SVN release 2546 of version 0.1.9998.
|
|---|
| 214 |
|
|---|