# # spec file for package boinc-client # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 by Sascha Manns # # 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/ # # Global definitions %define _use_internal_dependency_generator 0 %define __find_requires %wx_requires #define version_ 6_12_43 %define soname 7 %define boinc_dir %{_localstatedir}/lib/boinc Name: boinc-client Version: 7.2.42 Release: 0 Summary: The BOINC client License: GPL-3.0+ or LGPL-3.0+ Group: Productivity/Clustering/Computing Url: http://boinc.berkeley.edu/ #Source0: boinc_core_release_%{version_}.tar.bz2 # There is no real tarball, hence I did # # git clone git://boinc.berkeley.edu/boinc.git # git checkout master # git checkout -t client_release/7.2/7.2.42 # # then I created an archive via git # # git archive -v --format=tar --prefix=boinc-7.2.42/ \ # client_release/7.2/7.2.42 | bzip2 >../boinc-7.2.42.tar.bz2 Source0: boinc-%{version}.tar.bz2 Source1: boinc-icons.tar.bz2 Source2: boinc-gui.desktop Source3: README.SUSE Source4: sysconfig.%{name} Source5: boinc-logrotate Source6: boinc-manager # 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 Source20: %{name}.service Source100: %{name}-rpmlintrc # 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-LC_MESSAGES.patch Patch2: boinc-LC_MESSAGES.patch # PATCH-FIX-OPENSUSE boinc-docbook2x.patch Patch4: boinc-docbook2x.patch # PATCH-FIX-OPENSUSE coolo - #error: am__fastdepOBJCXX does not appear in AM_CONDITIONAL Patch7: %{name}-AM_CONDITIONAL.patch # PATCH-FIX-OPENSUSE computersalat - error: # configure.ac:898: required file `test/version.inc.in' not found # configure.ac:898: required file `py/Boinc/version.py.in' not found Patch8: boinc-configure.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires(pre): pwdutils BuildRequires: systemd %{?systemd_requires} BuildRequires: Mesa-devel BuildRequires: docbook2x BuildRequires: docbook_4 BuildRequires: fdupes BuildRequires: freeglut-devel BuildRequires: update-desktop-files %if 0%{?suse_version} >= 1310 BuildRequires: libXScrnSaver-devel BuildRequires: libXi-devel BuildRequires: libxcb-devel BuildRequires: xcb-util-devel %else BuildRequires: xorg-x11-libxcb-devel %endif BuildRequires: gcc-c++ BuildRequires: gcc-fortran BuildRequires: gettext-runtime BuildRequires: libcurl-devel >= 7.17.1 BuildRequires: libjpeg-devel BuildRequires: libnotify-devel BuildRequires: libtool BuildRequires: libxslt BuildRequires: mysql-devel BuildRequires: openssl-devel BuildRequires: pkg-config BuildRequires: pwdutils BuildRequires: python-mysql BuildRequires: sqlite3-devel BuildRequires: wxWidgets-devel >= 2.8.0 BuildRequires: xorg-x11-libXmu-devel Requires: cron Requires: logrotate ### FIXME: ## updating boinc-client or boinc-manager does not update libboinc6 ## hence we define this dependency ## !! Do not remove this dependency !! Requires: libboinc%{soname} = %{version}-%{release} %lang_package %lang_package -n boinc-manager %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 boinc-client Group: Productivity/Scientific/Astronomy Requires: boinc-manager-lang = %{version}-%{release} Requires: hicolor-icon-theme %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 boinc-client Group: Development/Libraries/C and C++ Requires: %{name} = %{version}-%{release} Requires: mysql-devel Requires: openssl-devel %description devel This package contains development files for %{name}. %package -n libboinc%{soname} Summary: Shared Libs for %{name} Group: System/Libraries %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 BuildArch: noarch %description doc This package contains documentation files for %{name}. %prep #setup -q -n boinc_core_release_%{version_} -D -a 1 %setup -q -n boinc-%{version} -D -a 1 %patch0 %patch2 %patch4 %patch7 %patch8 # 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 # fix utf8 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 # fix permissions and newlines on source files chmod 644 clientgui/{DlgItemProperties.h,AsyncRPC.cpp,DlgItemProperties.cpp} sed -i 's/\r//' clientgui/DlgItemProperties.cpp ### bnc#745656 ## remove files with questionable licenses # removing NVIDIA owned file that does not clearly allow redistribution or # modification %{__rm} coprocs/NVIDIA/include/nvapi.h # removing unnecessary APSL licensed files %{__rm} client/app_stats_mac.cpp %build #remove run libtoolize and ./_autosetup /usr/bin/libtoolize --force ./_autosetup %configure \ --disable-static \ --enable-dynamic-client-linkage \ --disable-server \ --disable-fcgi \ --enable-unicode \ --with-ssl \ --with-x # 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="-L%{_libdir} -lssl -ldl" \ CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \ CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \ DESTDIR=%{_prefix} %{?_smp_mflags} ### hmm, boincmgr is not build by default (but stated in configure) # BOINC Default enable values # --enable-server --enable-client --enable-libraries # --enable-manager: builds server, client, and libraries # # hence we jump into clientgui and build it manually pushd clientgui %{__make} libboinc_la_LIBADD="-L%{_libdir} -lssl -ldl" \ CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT -lgtk-x11-2.0" \ CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT -lgtk-x11-2.0" \ DESTDIR=%{_prefix} %{?_smp_mflags} popd pushd locale %{__make} popd %install %{makeinstall} for i in clientgui locale; do pushd $i %{makeinstall} popd done # Creates default folders %{__install} -dm0755 %{buildroot}%{boinc_dir} %{__install} -dm0755 %{buildroot}%{_mandir}/man1 # Remove old boinc & rename boinc_client to boinc-client %{__rm} -f %{buildroot}%{_bindir}/boinc %{__mv} -f %{buildroot}%{_bindir}/boinc_client %{buildroot}%{_bindir}/%{name} # Rename boincmgr and wrap it %{__mv} %{buildroot}%{_bindir}/boincmgr %{buildroot}%{_bindir}/boinc-gui # Install boinc-manager wrapper script %{__install} -Dm0755 %{S:6} %{buildroot}%{_bindir}/boinc-manager # Use symlink instead of hardlink pushd %{buildroot}%{_bindir} %{__ln_s} -f %{name} boinc %{__ln_s} -f boinc-manager boincmgr %{__ln_s} -f boinc-manager boincmanager popd # replace @boinc_dir@, @bindir@ %{__sed} -i \ -e "s,@boinc_dir@,%{boinc_dir},g" \ -e "s,@bindir@,%{_bindir},g" \ %{buildroot}%{_bindir}/boinc-manager # Remove /etc/sysconfig/boinc-client, it is added by %%fillup_and_insserv %{__rm} -f %{buildroot}%{_sysconfdir}/sysconfig/%{name} # Install init and create symlink for rcboinc %{__install} -D -m0644 %{S:20} %{buildroot}%{_unitdir}/%{name}.service mkdir -p %{buildroot}%{_sbindir} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} # And remove sysvinit script installed by boinc %{__rm} -r %{buildroot}/%{_initrddir} # Install logrotate %{__install} -Dm0644 %{S:5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} # Install bash completion %{__install} -Dpm0644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc # 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 # install icons %{__install} -m0644 clientgui/res/boincmgr.16x16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/boincmanager.png %{__install} -m0644 clientgui/res/boincmgr.32x32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/boincmanager.png %{__install} -m0644 clientgui/res/boincmgr.48x48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/boincmanager.png # Install *.desktop File %suse_update_desktop_file -i boinc-gui Utility # Remove static libraries, libtool archives %{__rm} %{buildroot}%{_libdir}/*.{a,la} # Relinking Manpages %{__ln_s} -f boincmgr.1.gz %{buildroot}%{_mandir}/man1/boinc-manager.1.gz %{__ln_s} -f boinccmd.1.gz %{buildroot}%{_mandir}/man1/boinccmd.1.gz %{__ln_s} -f 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-Client %find_lang BOINC-Manager %fdupes -s %{buildroot} %pre # add group %{_sbindir}/groupadd -r boinc 2>/dev/null || : # add user %{_sbindir}/useradd -c "BOINC Client" -d "%{_localstatedir}/lib/boinc" \ -g boinc -r -s /sbin/nologin boinc 2>/dev/null || : if [ -f %{_sysconfdir}/sysconfig/%{name} ]; then if [ "$(grep "BOINC_BOINC_USR" /etc/sysconfig/boinc-client | grep -v grep >/dev/null; echo $?)" == 1 ]; then mv -f %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/sysconfig/%{name}.save fi fi %service_add_pre %{name}.service %preun %service_del_preun %{name}.service %post %service_add_post %{name}.service %{_sbindir}/usermod -c "BOINC Client" -s /sbin/nologin boinc 2>/dev/null || : %postun %service_del_postun %{name}.service %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 notes todo README.SUSE %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/bash_completion.d/* %{_bindir}/boinc %{_bindir}/%{name} %{_bindir}/boinccmd %{_bindir}/boincscr %{_bindir}/switcher %{_mandir}/man1/boinccmd.1.gz %{_mandir}/man1/boinc.1.gz %{_unitdir}/%{name}.service %{_sbindir}/rc%{name} %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}/boinc-manager %{_bindir}/boincmgr %{_bindir}/boincmanager %{_datadir}/applications/boinc-gui.desktop %{_datadir}/icons/hicolor/*/apps/* %{_mandir}/man1/boincmgr.1.gz %{_mandir}/man1/boinc-manager.1.gz %files -n %{name}-lang -f BOINC-Client.lang %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