[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] ccache 2.4 rpm
On Wed, 9 Jun 2010, m0n0 wrote:
1. Thanks for your hint, I did not know that.
Hello Ole!
THe main reason for this, if I remember correctly, is, by default, systems
do not have /usr/local/bin in their PATH. I belive that is what Frank
told me long ago.
Anyway, I made some changes to your spec and am attaching it, you can see
what you think. Mainly I changed where the install goes, made it so it
will build on any system, compressed the man pages and added a couple
files to the RPM. Seems to build cleanly on my Falcon with GCC 4.5.0, but
I have not tested it yet, and I'm about to (fingers crossed) play with my
Coldfire board.
Keith
%define name ccache
%define release 1
%define version 2.4
Summary: A fast C/C++ compiler cache
License: GPL
Name: %{name}
Version: %{version}
Release: %{release}
Source: %{name}-%{version}.tar.gz
Group: Development/Tools
Packager: Ole Loots <ole@monochrom.net>
Vendor: Sparemint
Prefix: %{_prefix}
Docdir: %{_prefix}/doc
BuildRoot: %{_tmppath}/%{name}-root
Patch0: unify.c.patch
Patch1: ccache.h.patch
%description
ccache is a compiler cache. It speeds up recompilation of C/C++ code by caching
previous compilations and detecting when the same compilation is being done again.
This often results in a significant speedup in common compilations.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
CFLAGS="${RPM_OPT_FLAGS}" \
CXXFLAGS="${RPM_OPT_FLAGS}" \
./configure --prefix=%{_prefix}
make
%install
# Uncomment this if you are sure RPM_BUILD_ROOT is not /
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/man/man1
make install prefix=${RPM_BUILD_ROOT}%{_prefix} \
mandir=${RPM_BUILD_ROOT}%{_prefix}/share/man
install -m 755 ccache ${RPM_BUILD_ROOT}%{_prefix}/bin
strip ${RPM_BUILD_ROOT}%{_prefix}/bin/*
gzip -9nf ${RPM_BUILD_ROOT}%{_prefix}/share/man/man1/*
%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root)
%doc README COPYING
%attr(0755,root,root) %{_prefix}/bin/ccache
%attr(0644,root,root) %{_prefix}/share/man/man*/*
%changelog
* Wed Jun 9 2010 Ole Loots <ole@monochrom.net>
- Initial Sparemint release of version 2.4