1
0
forked from pool/boinc-client
boinc-client/boinc-client.spec

388 lines
12 KiB
RPMSpec
Raw Normal View History

#
# spec file for package boinc-client (Version 6.10.58)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
# Global definitions
%define version_ 6_10_58
%define soname 6
Name: boinc-client
Version: 6.10.58
Release: 1
Summary: The BOINC client core
License: LGPLv2+
Group: Productivity/Clustering/Computing
URL: http://boinc.berkeley.edu/
Source0: boinc_core_release-%{version_}.tar.bz2
Source1: boinc-logrotate
Source2: boinc-gui.desktop
Source3: README.SUSE
Source4: sysconfig.boinc-client
Source5: boinc-icons.tar.bz2
Source6: boincmanager
Source7: boinc-client-rpmlintrc
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
#
# ./generate-tarball.sh boinc_core_release_%{version_}
#
# Trim all binaries and other unnecessary things.
Source8: generate-tarball.sh
# PATCH-FIX-OPENSUSE boinc-guirpcauth.patch
# 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
# PATCH-FIX-OPENSUSE boinc-init.patch
Patch1: boinc-init.patch
# PATCH-FIX-OPENSUSE boinc-LC_MESSAGES.patch
Patch2: boinc-LC_MESSAGES.patch
# PATCH-FIX-OPENSUSE boinc-completion.patch
Patch3: boinc-completion.patch
# PATCH-FIX-OPENSUSE boinc-docbook2x.patch
Patch4: boinc-docbook2x.patch
# PATCH-FIX-OPENSUSE boinc-server.patch
Patch5: boinc-server.patch
# PATCH-FIX-OPENSUSE saigkill@opensuse.org adds define HAVE_STRCASESRTR
Patch6: boinc-client-str_util.patch
BuildRequires: libcurl-devel >= 7.17.1
BuildRequires: python-mysql
BuildRequires: update-desktop-files
BuildRequires: Mesa-devel
BuildRequires: freeglut-devel
BuildRequires: libopenssl-devel
BuildRequires: gettext-runtime
BuildRequires: mysql-devel
BuildRequires: wxWidgets-devel >= 2.8.7
BuildRequires: libjpeg-devel
BuildRequires: libxslt
BuildRequires: xorg-x11-libXmu-devel
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: docbook2x
BuildRequires: docbook_4
BuildRequires: pkg-config
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: m4
BuildRequires: make
BuildRequires: sqlite3-devel
BuildRequires: pwdutils
BuildRequires: patch
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): pwdutils
Requires(pre): %insserv_prereq
Requires(pre): %fillup_prereq
Requires: logrotate
Requires: cron
Requires: libboinc%{soname} = %{version}-%{release}
%define _use_internal_dependency_generator 0
%define __find_requires %wx_requires
%lang_package
%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: Productivity/Scientific/Astronomy
Requires: hicolor-icon-theme
Requires: %{name} = %{version}-%{release}
Requires: boinc-manager-lang = %{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.
%lang_package -n boinc-manager
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
Requires: openssl-devel
Requires: mysql-devel
%description devel
This package contains development files for %{name}.
%package -n libboinc%{soname}
Summary: Shared Libs for %{name}
Group: Productivity/Scientific/Astronomy
%description -n libboinc%{soname}
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 doc
Summary: Documentation files for %{name}
Group: Documentation/Other
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
Requires: %{name} = %{version}-%{release}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n boinc_core_release_%{version_}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
# Unpack icons
%{__tar} -xvjf %{S:5}
# Install user hints
%{__install} -m0644 %{S:3} README.SUSE
# Fix lang directories (refer patch2)
%{__mv} locale/pt_PT locale/pt
%{__mv} locale/sv_SE locale/sv
# fix warning: deprecated conversion from string constant to 'char*'
pushd clientgui/common/
%{__sed} -i 's/static char/static const char/g' wxFlatNotebookImages.h
popd
pushd clientgui/res/
%{__sed} -i 's/static char/static const char/g' *.xpm
popd
pushd clientgui/res/skins/default/graphic/
%{__sed} -i 's/static char/static const char/g' *.xpm
popd
%build
#remove ltmain.sh & run libtoolize and ./_autosetup
%{__rm} ltmain.sh
/usr/bin/libtoolize --force
./_autosetup
%configure --disable-dependency-tracking \
--enable-dynamic-client-linkage \
--disable-server \
--disable-fcgi \
--enable-unicode \
--with-ssl \
--with-x \
--disable-static
# 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
# Export Path and make
%{__make} clean
%{__make} libboinc_la_LIBADD="-lssl -ldl" \
CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \
CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \
DESTDIR=%{_prefix}
%install
%{makeinstall}
# Creates default folders
%{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/16x16/apps
%{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
%{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
%{__mkdir} -p %{buildroot}%{_initrddir}
%{__mkdir} -p %{buildroot}%{_localstatedir}/lib/boinc
%{__mkdir} -p %{buildroot}%{_mandir}/man1
%{__mkdir} -p %{buildroot}%{_sysconfdir}/logrotate.d/
# Remove old boinc & rename boinc_client to boinc-client
%{__rm} -f %{buildroot}%{_bindir}/boinc
%{__mv} -f %{buildroot}%{_bindir}/boinc_client %{buildroot}%{_bindir}/boinc-client
# Use symlink instead of hardlink
pushd %{buildroot}%{_bindir}
/bin/ln -sf boinc-client boinc
popd
# Rename boincmgr and wrap it
%{__mv} %{buildroot}%{_bindir}/boincmgr %{buildroot}%{_bindir}/boinc_gui
# Install boincmanager wrapper script
%{__install} -Dm0755 %{S:6} %{buildroot}%{_bindir}/boincmanager
# Remove /etc/sysconfig/boinc-client, it is added by %%fillup_and_insserv
%{__rm} -f %{buildroot}%{_sysconfdir}/sysconfig/boinc-client
# Install logrotate and create symlink to /etc/init.d/boinc-client
%{__install} -dm0755 %{buildroot}%{_sbindir}
/bin/ln -sf %{_sysconfdir}/init.d/boinc-client %{buildroot}%{_sbindir}/rcboinc-client
%{__install} -Dm0644 %{S:1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# Install bash completition
%{__install} -Dpm0644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc
# Install template for sysconfig
%{__install} -Dm0644 %{S:4} %{buildroot}/var/adm/fillup-templates/sysconfig.boinc-client
# Install desktop-file and icons
%{__install} -Dm0644 boinc-gui-128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/boinc-gui.png
%{__install} -Dm0644 boinc-gui-64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/boinc-gui.png
%{__install} -Dm0644 boinc-gui-48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/boinc-gui.png
%{__install} -Dm0644 boinc-gui-32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/boinc-gui.png
%{__install} -Dm0644 boinc-gui-22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/boinc-gui.png
%{__install} -Dm0644 boinc-gui-16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/boinc-gui.png
# Move and rename icons
%{__mv} %{buildroot}%{_datadir}/boinc/boincmgr.16x16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/boincmgr.png
%{__mv} %{buildroot}%{_datadir}/boinc/boincmgr.32x32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/boincmgr.png
%{__mv} %{buildroot}%{_datadir}/boinc/boincmgr.48x48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/boincmgr.png
# Install *.desktop File
%suse_update_desktop_file -i boinc-gui Utility
# Remove libtool archives
%{__rm} %{buildroot}%{_libdir}/*.la
# Relinking Manpages
/bin/ln -sf boincmgr.1.gz %{buildroot}%{_mandir}/man1/boincmanager.1.gz
/bin/ln -sf boinccmd.1.gz %{buildroot}%{_mandir}/man1/boinccmd.1.gz
/bin/ln -sf boinc.1.gz %{buildroot}%{_mandir}/man1/boinc.1.gz
# Fix spurious-executable-perm
%{__chmod} 0644 doc/*.php
# Install fake /var/lib/boinc
%{__install} -dm0755 %{buildroot}%{_var}/lib/boinc
# Prepare $LANG Packages
%find_lang BOINC-Manager
%fdupes -s %{buildroot}
%clean
%{__rm} -rf '%{buildroot}'
%pre
# Add 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
%{fillup_and_insserv boinc-client}
%preun
%stop_on_removal boinc-client
%postun
%restart_on_update boinc-client
%insserv_cleanup
%post -n boinc-manager
/usr/bin/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
/usr/bin/touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%post -n libboinc%{soname} -p /sbin/ldconfig
%postun -n libboinc%{soname} -p /sbin/ldconfig
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING COPYRIGHT INSTALL notes todo TODO_OLD README.SUSE
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/bash_completion.d/
/var/adm/fillup-templates/sysconfig.boinc-client
%{_bindir}/boinc
%{_bindir}/boinc-client
%{_sbindir}/rcboinc-client
%{_bindir}/boinccmd
%{_bindir}/switcher
%{_initrddir}/%{name}
%{_mandir}/man1/boinccmd.1.gz
%{_mandir}/man1/boinc.1.gz
%defattr(-,boinc,boinc,-)
%{_localstatedir}/lib/boinc/
%files doc
%defattr(-,root,root,-)
%doc checkin_*
%doc doc/*.txt doc/bolt doc/logo doc/*.php doc/*.png doc/*.html
%files -n boinc-manager
%defattr(-,root,root,-)
%{_bindir}/boinc_gui
%{_bindir}/boincmanager
%{_datadir}/applications/boinc-gui.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_mandir}/man1/boincmgr.1.gz
%{_mandir}/man1/boincmanager.1.gz
%files -n boinc-manager-lang -f BOINC-Manager.lang
%files -n libboinc%{soname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/boinc
%changelog