Blob Blame History Raw
%global revision dd0d630

Summary:       The BOINC client core
Name:          boinc-client
Version:       7.6.22
Release:       6%{?dist}
License:       LGPLv2+
Group:         Applications/Engineering
URL:           http://boinc.berkeley.edu/
Source0:        https://github.com/BOINC/boinc/archive/client_release/7.6/%{version}.tar.gz
Source1:        boinc-client-systemd
Source2:        boinc-client-logrotate-d
Source3:        boinc-manager.desktop

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

BuildRequires: curl-devel
BuildRequires: desktop-file-utils
BuildRequires: freeglut-devel
BuildRequires: wxGTK3-devel
BuildRequires: gettext
BuildRequires: gtk3-devel
BuildRequires: docbook2X
BuildRequires: libXmu-devel
BuildRequires: libjpeg-devel
BuildRequires: libnotify-devel
BuildRequires: libtool
BuildRequires: libXScrnSaver-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: openssl-devel
BuildRequires: sqlite-devel
BuildRequires: xcb-util-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 %{name}_release-7.6-%{version}

# Fix encoding
for file in $(ls | grep checkin_notes_20); do
    iconv -f ISO-8859-1 -t UTF-8 -o ${file}.utf8 ${file}
    mv ${file}.utf8 ${file}
done

# Fix file permissions
for file in $(ls clientgui | grep .cpp$ ) $(ls clientgui | grep .h$ ); do 
    chmod 644 clientgui/${file}
done

%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

%if %{defined boinc_platform}
%global confflags --with-boinc-platform=%{boinc_platform}
%endif

./_autosetup

%configure %{?confflags} \
  --disable-silent-rules \
  --enable-dynamic-client-linkage \
  --disable-server \
  --disable-fcgi \
  --enable-unicode \
  --with-wx-config=/usr/bin/wx-config-3.0 \
  --with-ssl \
  --with-x \
  STRIP=: \
  DOCBOOK2X_MAN=/usr/bin/db2x_docbook2man \
  "CXXFLAGS=$(pkg-config gtk+-x11-3.0 --cflags --libs) ${RPM_OPT_FLAGS} -DNDEBUG"

# 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/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/

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

# Set up links to correct log locations
#ln -s /var/log/boinc/ %%{_localstatedir}/log/boinc.log 
#ln -s /var/log/boinc/ %%{_localstatedir}/log/boincerr.log 

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

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

# Install Icons
install -p -m644  packages/generic/sea/boincmgr.16x16.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
install -p -m644 packages/generic/sea/boincmgr.32x32.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
install -p -m644 packages/generic/sea/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 -p -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
%defattr(-,root,root)
%doc COPYING COPYRIGHT
%{_bindir}/boinc
%{_bindir}/boinc_client
%{_bindir}/boinccmd
%{_bindir}/switcher
%{_unitdir}/%{name}.service
%{_mandir}/man1/boinccmd.1.gz
%{_mandir}/man1/boinc.1.gz
%{_libdir}/*.so.*
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/bash_completion.d/%{name}
%attr(-,boinc,boinc) %{_localstatedir}/lib/boinc/
/etc/bash_completion.d/boinc-client
/etc/logrotate.d/boinc-client

%files doc
%defattr(-,root,root)
%doc checkin_notes checkin_notes_*

%files -n boinc-manager -f BOINC-Manager.lang
%defattr(-,root,root)
%{_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
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/boinc

%changelog
* Sat Jun 25 2016 Germano Massullo <germano.massullo@gmail.com> - 7.6.22-6
- Improved solution to RH bugreport #1347423. Used -DNDEBUG flag instead of patching source code

* Sat Jun 25 2016 Germano Massullo <germano.massullo@gmail.com> - 7.6.22-5
- disabled wxWidgets trace. See RH bugreport #1347423

* Mon May 16 2016 Germano Massullo <germano.massullo@gmail.com> - 7.6.22-4
- Changed gtk+-x11-2.0 to gtk+-x11-3.0

* Mon May 16 2016 Germano Massullo <germano.massullo@gmail.com> - 7.6.22-3
- Edited systemd script to fix bugreport #1329332

* Mon May 16 2016 Germano Massullo <germano.massullo@gmail.com> - 7.6.22-2
- Rebuild to enforce GTK2 stuff removal and do tests to fix bugreport #1323492

* Thu Feb 18 2016 Laurence Field <laurence.field@cern.ch> - 7.6.22-1
- Upstream release of version 7.6.22

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.42-9.gitdd0d630
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sun Jan 31 2016 Germano Massullo <germano.massullo@gmail.com> - 7.2.42-8.gitdd0d630
- Fixed %%{_sysconfdir}/bash_completion.d/ See https://bugzilla.redhat.com/show_bug.cgi?id=1192799

* Mon Nov 09 2015 Germano Massullo <germano.massullo@gmail.com> - 7.2.42-7.gitdd0d630
- fixed %%{_localstatedir}/lib/boinc/ ownership.

* Mon Aug 03 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 7.2.42-6.gitdd0d630
- Rework CXXFLAGS handling (Fix F23FTBS, RHBZ#1239389).
- Fix bogus permissions on %%{_localstatedir}/lib/boinc.

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.2.42-5.gitdd0d630
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Nov 20 2014 Mattia Verga <mattia.verga@tiscali.it> - 7.2.42-4.gitdd0d630
- Clean up build requires and delete not official script.

* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.2.42-3.gitdd0d630
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.2.42-2.gitdd0d630
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* 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