Blob Blame History Raw
%global revision dd0d630

Summary:	The BOINC client core
Name:		boinc-client
Version:	7.2.42
Release:	1.git%{revision}%{?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:
# git clone git://boinc.berkeley.edu/boinc-v2.git boinc-repo
# pushd boinc-repo
# git checkout client_release/7.2/7.2.42
# ./_autosetup
# ../trim . Trim all binaries and other unnecessary things.
# rm -rf .git*
# popd
# mv boinc-repo boinc
# tar -cJvf boinc-%%{version}.tar.xz boinc
Source0:	boinc-%{version}.tar.xz
Source1:	boinc-client-systemd
Source2:	boinc-client-logrotate-d
Source3:	boinc-manager.desktop
Source4:	USAGE_FEDORA
Source5:	trim
Source6:	boinc_gpu
#Create password file rw for group, this enables passwordless connection
#of manager from users of the boinc group.
#This won't be probably upstreamed as it might be unsafe for common usage
#without setting proper group ownership of the password file.
Patch0:		boinc-guirpcauth.patch
# Fix Italian locale broken directory
Patch1:		boinc-client-locale.patch
# Backport patch from 7.3 branch to fix idle time detection
Patch2:		boinc-7.2.39-idledetect.patch

Requires:	logrotate
Requires(post):		systemd
Requires(preun):	systemd
Requires(postun):	systemd
Requires(pre):		shadow-utils

BuildRequires:	MySQL-python
BuildRequires:	sqlite-devel
BuildRequires:	curl-devel
BuildRequires:	desktop-file-utils
BuildRequires:	freeglut-devel
BuildRequires:	mesa-libGLU-devel
BuildRequires:	openssl-devel
BuildRequires:	wxGTK-devel
BuildRequires:	gettext
BuildRequires:	mariadb-devel
BuildRequires:	libXmu-devel
BuildRequires:	libjpeg-devel
BuildRequires:	docbook2X
BuildRequires:	xcb-util-devel
BuildRequires:	libnotify-devel
BuildRequires:	gtk2-devel
BuildRequires:	libXScrnSaver-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

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

%package static
Summary:	Static libraries for %{name}
Group:		Development/Libraries

Requires:	%{name}-devel = %{version}-%{release}

%description static
This package contains static libraries for %{name}.

%package doc
Summary:	Documentation files for %{name}
Group:		Documentation
BuildArch:	noarch

Requires:	%{name} = %{version}-%{release}

%description doc
This package contains documentation files for %{name}.

%prep
%setup -q -n boinc
%patch0
%patch1
%patch2

# fix utf8
iconv -f ISO88591 -t UTF8 < checkin_notes_2004 > checkin_notes_2004.utf8
touch -r checkin_notes_2004 checkin_notes_2004.utf8
mv checkin_notes_2004.utf8 checkin_notes_2004

iconv -f ISO88591 -t UTF8 < checkin_notes_2005 > checkin_notes_2005.utf8
touch -r checkin_notes_2005 checkin_notes_2005.utf8
mv checkin_notes_2005.utf8 checkin_notes_2005

iconv -f ISO88591 -t UTF8 < checkin_notes_2009 > checkin_notes_2009.utf8
touch -r checkin_notes_2009 checkin_notes_2009.utf8
mv checkin_notes_2009.utf8 checkin_notes_2009

iconv -f ISO88591 -t UTF8 < checkin_notes_2010 > checkin_notes_2010.utf8
touch -r checkin_notes_2010 checkin_notes_2010.utf8
mv checkin_notes_2010.utf8 checkin_notes_2010

iconv -f ISO88591 -t UTF8 < checkin_notes_2011 > checkin_notes_2011.utf8
touch -r checkin_notes_2011 checkin_notes_2011.utf8
mv checkin_notes_2011.utf8 checkin_notes_2011

%build
%ifarch %{ix86}
%global boinc_platform i686-pc-linux-gnu
%endif
%ifarch powerpc ppc
%global boinc_platform powerpc-linux-gnu
%endif
%ifarch powerpc64 ppc64
%global boinc_platform ppc64-linux-gnu
%endif

# Install user hints
install -p -m644 %{SOURCE4} .

%global confflags --disable-dependency-tracking --enable-dynamic-client-linkage --disable-server --disable-fcgi --enable-unicode --with-ssl --with-x STRIP=: DOCBOOK2X_MAN=/usr/bin/db2x_docbook2man

%if %{defined boinc_platform}
CXXFLAGS=`pkg-config gtk+-x11-2.0 --cflags --libs` %configure %{confflags} --with-boinc-platform=%{boinc_platform}
%else
CXXFLAGS=`pkg-config gtk+-x11-2.0 --cflags --libs` %configure %{confflags}
%endif

# Disable rpaths
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool

make %{?_smp_mflags}

%install
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%{_unitdir}
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

pushd $RPM_BUILD_ROOT%{_bindir}

rm boinc
cat > boinc <<EOF
#!/bin/bash
# wrapper script that redirects stdout/stderr to correct log paths

# we allow multiple clients so that the client does not think there is another instance running (namely this wrapper)
%{_bindir}/boinc_client --allow_multiple_clients \$@ >> %{_localstatedir}/log/boinc.log 2>> %{_localstatedir}/log/boincerr.log 
EOF
chmod a+x boinc

# remove libtool archives
rm $RPM_BUILD_ROOT%{_libdir}/*.la

popd

# own systemd script and logrotate configuration file
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
install -p -m755 %{SOURCE6} $RPM_BUILD_ROOT%{_bindir}

# icon
cp -p clientgui/res/boincmgr.16x16.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
cp -p clientgui/res/boincmgr.32x32.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
cp -p clientgui/res/boincmgr.48x48.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/boincmgr.png

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

%find_lang BOINC-Manager
%find_lang BOINC-Client

# bash-completion
install -Dp -m644 client/scripts/boinc.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/boinc-client

%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/ldconfig
%systemd_post boinc-client.service

%preun
%systemd_preun boinc-client.service

%postun
/sbin/ldconfig
%systemd_postun_with_restart boinc-client.service  

%post -n boinc-manager
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun -n boinc-manager
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans -n boinc-manager
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files -f BOINC-Client.lang
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/bash_completion.d/
%doc COPYING COPYRIGHT USAGE_FEDORA
%{_bindir}/boinc
%{_bindir}/boinc_client
%{_bindir}/boinccmd
%{_bindir}/boinc_gpu
%{_bindir}/switcher
%{_unitdir}/%{name}.service
%{_mandir}/man1/boinccmd.1.gz
%{_mandir}/man1/boinc.1.gz
%{_libdir}/*.so.*
%defattr(775,boinc,boinc,775)
%{_localstatedir}/lib/boinc/

%files doc
%doc checkin_notes checkin_notes_*

%files -n boinc-manager -f BOINC-Manager.lang
%{_bindir}/boincmgr
%{_bindir}/boincscr
%{_datadir}/applications/boinc-manager.desktop
%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
%{_datadir}/icons/hicolor/48x48/apps/boincmgr.png
%{_mandir}/man1/boincmgr.1.gz

%files static
%{_libdir}/libboinc.a
%{_libdir}/libboinc_api.a
%{_libdir}/libboinc_crypt.a
%{_libdir}/libboinc_graphics2.a
%{_libdir}/libboinc_opencl.a

%files devel
%{_libdir}/*.so
%{_includedir}/boinc

%changelog
* Wed Mar 19 2014 Mattia Verga <mattia.verga@tiscali.it> - 7.2.42-1.gitdd0d630
- Upgrade to 7.2.42

* Wed Feb 19 2014 Mattia Verga <mattia.verga@tiscali.it> - 7.2.39-1.gitdc95e3f
- Upgrade to 7.2.39 #1065275
- Remove ControlGroup setting from systemd unit file. #1065648
- Backport patch from 7.3 branch to (hopefully) fix idle time detection. #1047044

* Fri Feb 07 2014 Mattia Verga <mattia.verga@tiscali.it> - 7.2.33-3.git1994cc8
- Remove CPUShares limitation to systemd unit. #1038283

* Tue Dec 17 2013 Mattia Verga <mattia.verga@tiscali.it> - 7.2.33-2.git1994cc8
- Change default attribute of /var/lib/boinc to give write permission to boinc group
- Fix systemd requires as described in guidelines

* Tue Dec 17 2013 Mattia Verga <mattia.verga@tiscali.it> - 7.2.33-1.git1994cc8
- Update to 7.2.33
- Removed no more needed X11 patch
- Removed boinc manager notification patch see bug #990693
- Add patch to fix Italian locale dir
- Enabled parallel make
- Removed boincmgr wrap
- Fix checkin_notes
- Added boinc_gpu wrapper to fix GPU detection (see instruction on how to use it)
- Build now requires mariadb-devel instead of mysql-devel as actual default for Fedora
- Fix trim script for new directory and not remove html dir for build error
- Remove scripts for update from sysV to systemd

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.0.65-2.git79b00ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Apr 28 2013 Miloš Jakubíček <xjakub@fi.muni.cz> - 7.0.65-1.git79b00ef
- Update to 7.0.65
- Fix /var/lib/boinc user and group (typo caused by the previous commit)

* Wed Feb 13 2013 Rahul Sundaram <sundaram@fedoraproject.org> - 7.0.44-3.git443c49949
- remove vendor tag from desktop file. https://fedorahosted.org/fpc/ticket/247
- clean up spec to follow current guidelines
- use systemd macros. resolves rhbz#850049

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.0.44-2.git443c49949
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Jan 15 2013 Miloš Jakubíček <xjakub@fi.muni.cz> - 7.0.44-1.git443c49949
- Svn to Git switch of upstream sources
- Rebase the 7.0a branch to 7.0.44 (pulled from git)
- Removed BR: automake
- Dropped boinc-xcb-compat.patch (merged upstream)

* Tue Jan 15 2013 Miloš Jakubíček <xjakub@fi.muni.cz> - 7.0.36-2.r26158svn
- Added BR: automake

* Sat Jan 12 2013 Miloš Jakubíček <xjakub@fi.muni.cz> - 7.0.36-1.r26158svn
- Rebase the 7.0a branch to 7.0.36
- Removed non-free code as per BZ#894290
- Dropped boinc-client-menu.patch (merged upstream)

* Mon Aug 20 2012 Adam Jackson <ajax@redhat.com> 7.0.29-3.r25790svn
- Rebuild for new xcb-util soname

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.0.29-2.r25790svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Jul 09 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 7.0.29-1.r25790svn
- Update to 7.0a branch
- Added boinc-client-X11.patch to workaround a --no-as-needed build issue
- Added boinc-manager-client-notification.patch to be tell users about how
  to setup Boinc on Fedora
- Added backported boinc-client-menu.patch to fix menu display
- Don't use Boinc rotating log files (never deletes them)
- Fix automatic startup of the service
- Fix leaving lockfile after service stop
- Resolve BZ#731669, BZ#814060, BZ#825032, BZ#827912, BZ#829564, BZ#834900,
  BZ#838507.

* Fri Jun 22 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 6.12.43-2.r25218svn
- Fixed naming systemd service file
- Fixed logging to /var/log/boinc.log and /var/log/boincerr.log

* Wed Feb 08 2012 Miloš Jakubíček <xjakub@fi.muni.cz> - 6.12.43-1.r25218svn
- Rebase the 6.12 branch to 6.12.43
- Switch from SysVInit to systemd
- drop boinc-libnotify.patch (merged upstream)

* Thu Jan 12 2012 Adam Jackson <ajax@redhat.com> 6.12.35-4.rsvn
- boinc-xcb-compat.patch: Also fix the atom enums to be compatible with
  new XCB.

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 6.12.35-3.r24014svn
- Rebuild for new libpng

* Thu Dec 01 2011 Adam Jackson <ajax@redhat.com> 6.12.35-2.rsvn
- Rebuild for new xcb-util
- boinc-glib-compat.patch: Build compat with new glib
- boinc-xcb-compat.patch: Build compat with new xcb-util

* Fri Aug 19 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 6.12.35-1.r24014svn
- Update to 6.12 branch (fix BZ#719875, BZ#690333)
- Dropped boinc-gui-rpc-port.patch (merged upstream)
- Added BR: libnotify-devel, xcb-util-devel
- Added boinc-libnotify.patch to build with libnotify >= 0.7
- Added boinc-manager-Makefile.patch to fix Makefile indentation error
- Now shipping also BOINC screensaver
- Added BOINC Client translation files
- Fixed scheduling problems related to cgroups (BZ#705444)

* Wed Feb 09 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 6.10.58-3.r22930svn
- Add boinc-gui-rpc-port.patch, fixing BZ#620585

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.10.58-2.r22930svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jan 20 2011 Miloš Jakubíček <xjakub@fi.muni.cz> - 6.10.58-1.r22930svn
- Rebase the 6.10 branch to 6.10.58
- Fix rpmlint complaining:
- E: executable-marked-as-config-file /etc/sysconfig/boinc-client
- E: script-without-shebang /etc/sysconfig/boinc-client