Blob Blame History Raw
%define snap 20080315
%define version_ 5_10_45

Summary:	The BOINC client core
Name:		boinc-client
Version:	5.10.45
Release:	4.%{snap}svn%{?dist}
License:	LGPLv2+
Group:		Applications/Engineering
URL:		http://boinc.berkeley.edu/
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
# svn export http://boinc.berkeley.edu/svn/tags/boinc_core_release_%{version_}
# pushd boinc_core_release_%{version_}
# ./_autosetup
# ./noexec Fix unnecessary execute rights on documentation files
# ./unicode Convert to UTF8
# popd
# ./trim boinc_core_release_%{version_}
# tar -czvf boinc-%{version}.tar.gz boinc_core_release_%{version_}/
# The trim script trims all binaries and other unnecessary things.
Source0:	boinc-%{version}.tar.gz
Source1:	boinc-client-init-d
Source2:	boinc-client-logrotate-d
Source3:	boinc-manager.desktop
Source4:	boinc.1
Source5:	boinc_client.1
Source6:	boinc_cmd.1
Source7:	boincmgr.1
Source8:	trim
Source9:	noexec
Source10:	unicode
Patch0:		boinc-gcc43.patch
Patch1:		boinc-gccflags.patch

BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires:	logrotate
Requires:	chkconfig
Requires(pre):  shadow-utils

BuildRequires:	MySQL-python
BuildRequires:	curl-devel
BuildRequires:	desktop-file-utils
BuildRequires:	freeglut-devel
BuildRequires:	mesa-libGLU-devel
BuildRequires:	openssl-devel
BuildRequires:	wxGTK-devel
BuildRequires:  gettext
BuildRequires:  mysql-devel
BuildRequires:  libXmu-devel
BuildRequires:  libjpeg-devel

%description
The Berkeley Open Infrastructure for Network Computing (BOINC) is an open-
source software platform which supports distributed computing, primarily in
the form of "volunteer" computing and "desktop Grid" computing.  It is well
suited for problems which are often described as "trivially parallel".  BOINC
is the underlying software used by projects such as SETI@home, Einstein@Home,
ClimatePrediciton.net, the World Community Grid, and many other distributed
computing projects.

This package installs the BOINC client software, which will allow your
computer to participate in one or more BOINC projects, using your spare
computer time to search for cures for diseases, model protein folding, study
global warming, discover sources of gravitational waves, and many other types
of scientific and mathematical research.

%package -n boinc-manager
Summary:	GUI to control and monitor %{name}
Group:		Applications/Engineering

Requires:	hicolor-icon-theme
Requires:	%{name} = %{version}-%{release}

%description -n boinc-manager
The BOINC Manager is a graphical monitor and control utility for the BOINC
core client. It gives a detailed overview of the state of the client it is
monitoring. The BOINC Manager has two modes of operation, the "Simple View" in
which it only displays the most important information and the "Advanced View"
in which all information and all control elements are available.

%package devel
Summary:	Development files for %{name}
Group:		Development/Libraries

Requires:	%{name} = %{version}-%{release}
Requires:	openssl-devel
Requires:	mysql-devel
Provides:	%{name}-static = %{version}-%{release}

%description devel
This package contains development files for %{name}.

%prep
%setup -q -n boinc_core_release_%{version_}
%patch0 -p1
%patch1 -p1

%build
%configure --disable-static --enable-unicode

# Parallel make does not work.
make -k

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/boinc
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/

make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT

rm -rf $RPM_BUILD_ROOT%{_bindir}/1sec
rm -rf $RPM_BUILD_ROOT%{_bindir}/concat
rm -rf $RPM_BUILD_ROOT%{_bindir}/create_work
rm -rf $RPM_BUILD_ROOT%{_bindir}/dir_hier_move
rm -rf $RPM_BUILD_ROOT%{_bindir}/dir_hier_path
rm -rf $RPM_BUILD_ROOT%{_bindir}/sign_executable
rm -rf $RPM_BUILD_ROOT%{_bindir}/start
rm -rf $RPM_BUILD_ROOT%{_bindir}/status
rm -rf $RPM_BUILD_ROOT%{_bindir}/stop
rm -rf $RPM_BUILD_ROOT%{_bindir}/updater
rm -rf $RPM_BUILD_ROOT%{_bindir}/upper_case

pushd $RPM_BUILD_ROOT%{_bindir}
  ln -s boinc_client boinc
  mv boinc_gui boincmgr
popd

mv $RPM_BUILD_ROOT%{_bindir}/ca-bundle.crt \
  $RPM_BUILD_ROOT%{_localstatedir}/lib/boinc

install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name}
install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}

# icon
install -p -m644 sea/boincmgr.16x16.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
install -p -m644 sea/boincmgr.32x32.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
install -p -m644 sea/boincmgr.48x48.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/boincmgr.png

# man page
install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m644 %{SOURCE6} $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m644 %{SOURCE7} $RPM_BUILD_ROOT%{_mandir}/man1

desktop-file-install %{?_remove_encoding} --vendor fedora \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE3}

# locales

mv locale/client/* locale
find locale -not -name "BOINC Manager.mo" -delete
cp -rp locale $RPM_BUILD_ROOT%{_datadir}
find $RPM_BUILD_ROOT%{_datadir}/locale -name "BOINC Manager.mo" -execdir mv {} BOINC-Manager.mo \;

%find_lang BOINC-Manager

%clean
rm -rf $RPM_BUILD_ROOT

%pre

# Create BOINC user and group
getent group boinc >/dev/null || groupadd -r boinc
getent passwd boinc >/dev/null || \
useradd -r -g boinc -d %{_localstatedir}/lib/boinc -s /sbin/nologin \
	-c "BOINC client account." boinc
exit 0

%post
/sbin/chkconfig --add boinc-client

%preun
if [ $1 -eq 0 ]; then #if uninstalling, not only updating
	/sbin/service boinc-client stop
	/sbin/chkconfig --del boinc-client
fi

%post -n boinc-manager
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun -n boinc-manager
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%doc COPYING
%doc COPYRIGHT
%doc checkin_notes
%doc checkin_notes_2007
%doc checkin_notes_2006
%doc checkin_notes_2005
%doc checkin_notes_2004
%doc checkin_notes_2003
%doc checkin_notes_2002
%{_localstatedir}/lib/boinc
%{_bindir}/boinc
%{_bindir}/boinc_client
%{_bindir}/boinc_cmd
%{_bindir}/crypt_prog
%{_bindir}/switcher
%{_initrddir}/%{name}
%{_mandir}/man1/boinc.1.gz
%{_mandir}/man1/boinc_client.1.gz
%{_mandir}/man1/boinc_cmd.1.gz
%{_mandir}/man1/boincmgr.1.gz

%files -n boinc-manager -f BOINC-Manager.lang
%defattr(-,root,root,-)
%{_bindir}/boincmgr
%{_datadir}/applications/fedora-boinc-manager.desktop
%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
%{_datadir}/icons/hicolor/48x48/apps/boincmgr.png

%files devel
%defattr(-,root,root,-)
%{_libdir}/libboinc.a
%{_libdir}/libboinc_api.a
%{_libdir}/libboinc_zip.a
%{_libdir}/libsched.a
%{_libdir}/libboinc_graphics2.a
%{_libdir}/libboinc_graphics_api.a
%{_libdir}/libboinc_graphics_impl.a
%{_libdir}/libboinc_graphics_lib.a

%dir %{_includedir}/BOINC
%{_includedir}/BOINC/*

%changelog

* Mon Mar 24 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.45-4.20080315svn
- Removed unnecessary slash before the {_localstatedir} macro.

* Sun Mar 23 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.45-3.20080315svn
- Logs moved to /var/log so that all SELinux related things could be removed.
- The error.log file has been renamed to boincerr.log.

* Sun Mar 16 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.45-2.20080315svn
- Fixed typo in the semanage command (missing boinc subdirectory and quotes).
- Fixed installing empty log files.
- Fixed Patch1 (has been created before propagating the flags using the
  _autosetup script).

* Sat Mar 15 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.45-1.20080315svn
- Updated to 5.10.45
- Added Patch1 removing -fomit-frame-pointer and -ffast-math compiler flags.
- Updated Patch0 (/lib/boinc_cmd.C changes have been merged in upstream).
- Log files (/var/lib/{boinc,error}.log) are touched during the installation
  so that correct(?) SELinux context can be set on them.
- Added Requires(post, postun): policycoreutils because of previous point.

* Sat Mar 08 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-8.20080206svn
- Added missing Requires: mysql-devel for the -devel subpackage

* Fri Mar 07 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-7.20080206svn
- Removed unnecessary client stopping when upgrading.
- Removed unnecessary ldconfig calls.
- A few changes unifying macros usage.
- Fixed missing directory ownership of {_localstatedir}/lib/boinc
- Added missing Requires: openssl-devel for the -devel subpackage

* Wed Feb 27 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-6.20080206svn
- Added patch making the sources compatible with GCC4.3

* Mon Feb 25 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-5.20080206svn
- Added the "stripchart" source directory to be trimmed.
- Removed all translations (will be added later through l10n specspo module).
- Fixed logrotate in case that boinc won't be running at the logrotate time.
- Changed summary and description according to upstream's choice.
- Fixed wrong SELinux context on error.log and boinc.log.
- Removed .svn directories from the source.
- Fixed missing Short-Description field in the init script.
- Service disabled by default.
- Fixed missing reload action in the init script.
- Changed the way of using the subsys directory for locking so that 
  rpmlint doesn't complain.
- Added script converting non-unicode files into UTF8.
- Added script removing execution rights on documentation files.
- Added documentation: checkin_notes_2007
- Init script behaves polite now when starting/stopping the service which
  has been already started/stopped (i.e. exits with 0).

* Fri Feb 16 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-4.20080206svn
- Fixed locales installation path
- Fixed missing Provides: boinc-client-static in the -devel subpackage

* Thu Feb 14 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-3.20080206svn
- Fixed the init script (now using the daemon function properly)
- Fixed missing chkconfig setup
- Added Requires: chkconfig

* Tue Feb 12 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-2.20080206svn
- Fixed missing boinc user and group

* Tue Feb 06 2008 Milos Jakubicek <xjakub@fi.muni.cz> - 5.10.40-1.20080206svn
- Updated to 5.10.40.
- Fixed unpackaged files: libboinc_graphics*.
- Fixed missing BuildRequires: mysql-devel, libXmu-devel, libjpeg-devel.
- Added locales.
- Added script trimming binaries and other unnecessary code from the source.
- Added ldconfig call for the -devel subpackage.
- Added Czech and German translation.

* Wed Jan 09 2008 Debarshi Ray <rishi@fedoraproject.org> - 5.10.32-1.20080109svn
- Initial build. Imported SPEC written by Eric Myers and Milos Jakubicek.
- Disabled parallel make to prevent failure with -j3.