1
0
forked from pool/boinc-client

- Cleanup with spec-cleaner for better readability

- Move lang packages from Requires to Recommends

OBS-URL: https://build.opensuse.org/package/show/network/boinc-client?expand=0&rev=37
This commit is contained in:
Tomáš Chvátal 2014-06-17 13:30:54 +00:00 committed by Git OBS Bridge
parent 6c6423086e
commit 299b4fff43
2 changed files with 79 additions and 73 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 17 13:30:10 UTC 2014 - tchvatal@suse.com
- Cleanup with spec-cleaner for better readability
- Move lang packages from Requires to Recommends
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 17 13:13:14 UTC 2014 - tchvatal@suse.com Tue Jun 17 13:13:14 UTC 2014 - tchvatal@suse.com

View File

@ -19,11 +19,10 @@
# Global definitions # Global definitions
%define _use_internal_dependency_generator 0 %define _use_internal_dependency_generator 0
%define __find_requires %wx_requires %define __find_requires %{wx_requires}
#define version_ 6_12_43 #define version_ 6_12_43
%define soname 7 %define soname 7
%define boinc_dir %{_localstatedir}/lib/boinc %define boinc_dir %{_localstatedir}/lib/boinc
Name: boinc-client Name: boinc-client
Version: 7.2.42 Version: 7.2.42
Release: 0 Release: 0
@ -43,7 +42,7 @@ Url: http://boinc.berkeley.edu/
# git archive -v --format=tar --prefix=boinc-7.2.42/ \ # git archive -v --format=tar --prefix=boinc-7.2.42/ \
# client_release/7.2/7.2.42 | bzip2 >../boinc-7.2.42.tar.bz2 # client_release/7.2/7.2.42 | bzip2 >../boinc-7.2.42.tar.bz2
Source0: boinc-%{version}.tar.bz2 Source0: boinc-%{version}.tar.bz2
Source1: boinc-icons.tar.bz2 Source1: boinc-icons.tar.bz2
Source2: boinc-gui.desktop Source2: boinc-gui.desktop
Source3: README.SUSE Source3: README.SUSE
Source4: sysconfig.%{name} Source4: sysconfig.%{name}
@ -74,25 +73,11 @@ Patch7: %{name}-AM_CONDITIONAL.patch
# configure.ac:898: required file `test/version.inc.in' not found # configure.ac:898: required file `test/version.inc.in' not found
# configure.ac:898: required file `py/Boinc/version.py.in' not found # configure.ac:898: required file `py/Boinc/version.py.in' not found
Patch8: boinc-configure.patch Patch8: boinc-configure.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): pwdutils
BuildRequires: systemd
%{?systemd_requires}
BuildRequires: Mesa-devel BuildRequires: Mesa-devel
BuildRequires: docbook2x BuildRequires: docbook2x
BuildRequires: docbook_4 BuildRequires: docbook_4
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: freeglut-devel 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-c++
BuildRequires: gcc-fortran BuildRequires: gcc-fortran
BuildRequires: gettext-runtime BuildRequires: gettext-runtime
@ -107,16 +92,29 @@ BuildRequires: pkg-config
BuildRequires: pwdutils BuildRequires: pwdutils
BuildRequires: python-mysql BuildRequires: python-mysql
BuildRequires: sqlite3-devel BuildRequires: sqlite3-devel
BuildRequires: systemd
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-devel >= 2.8.0 BuildRequires: wxWidgets-devel >= 2.8.0
BuildRequires: xorg-x11-libXmu-devel BuildRequires: xorg-x11-libXmu-devel
Requires: cron Requires: cron
Requires: logrotate
### FIXME: ### FIXME:
## updating boinc-client or boinc-manager does not update libboinc6 ## updating boinc-client or boinc-manager does not update libboinc6
## hence we define this dependency ## hence we define this dependency
## !! Do not remove this dependency !! ## !! Do not remove this dependency !!
Requires: libboinc%{soname} = %{version}-%{release} Requires: libboinc%{soname} = %{version}-%{release}
Recommends: boinc-client-lang = %{version}
Requires: logrotate
Requires(pre): pwdutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%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
%lang_package %lang_package
%lang_package -n boinc-manager %lang_package -n boinc-manager
@ -138,7 +136,7 @@ of scientific and mathematical research.
%package -n boinc-manager %package -n boinc-manager
Summary: GUI to control and monitor boinc-client Summary: GUI to control and monitor boinc-client
Group: Productivity/Scientific/Astronomy Group: Productivity/Scientific/Astronomy
Requires: boinc-manager-lang = %{version}-%{release} Recommends: boinc-manager-lang = %{version}
Requires: hicolor-icon-theme Requires: hicolor-icon-theme
%description -n boinc-manager %description -n boinc-manager
@ -187,21 +185,21 @@ This package contains documentation files for %{name}.
%patch8 %patch8
# Install user hints # Install user hints
%{__install} -m0644 %{S:3} README.SUSE install -m0644 %{SOURCE3} README.SUSE
# Fix lang directories (refer patch2) # Fix lang directories (refer patch2)
%{__mv} locale/pt_PT locale/pt mv locale/pt_PT locale/pt
%{__mv} locale/sv_SE locale/sv mv locale/sv_SE locale/sv
# fix warning: deprecated conversion from string constant to 'char*' # fix warning: deprecated conversion from string constant to 'char*'
pushd clientgui/common/ pushd clientgui/common/
%{__sed} -i 's/static char/static const char/g' wxFlatNotebookImages.h sed -i 's/static char/static const char/g' wxFlatNotebookImages.h
popd popd
pushd clientgui/res/ pushd clientgui/res/
%{__sed} -i 's/static char/static const char/g' *.xpm sed -i 's/static char/static const char/g' *.xpm
popd popd
pushd clientgui/res/skins/default/graphic/ pushd clientgui/res/skins/default/graphic/
%{__sed} -i 's/static char/static const char/g' *.xpm sed -i 's/static char/static const char/g' *.xpm
popd popd
# fix utf8 # fix utf8
@ -225,14 +223,14 @@ sed -i 's/\r//' clientgui/DlgItemProperties.cpp
## remove files with questionable licenses ## remove files with questionable licenses
# removing NVIDIA owned file that does not clearly allow redistribution or # removing NVIDIA owned file that does not clearly allow redistribution or
# modification # modification
%{__rm} coprocs/NVIDIA/include/nvapi.h rm coprocs/NVIDIA/include/nvapi.h
# removing unnecessary APSL licensed files # removing unnecessary APSL licensed files
%{__rm} client/app_stats_mac.cpp rm client/app_stats_mac.cpp
%build %build
#remove run libtoolize and ./_autosetup #remove run libtoolize and ./_autosetup
/usr/bin/libtoolize --force %{_bindir}/libtoolize --force
./_autosetup ./_autosetup
%configure \ %configure \
--disable-static \ --disable-static \
@ -244,12 +242,12 @@ sed -i 's/\r//' clientgui/DlgItemProperties.cpp
--with-x --with-x
# Disable rpaths # Disable rpaths
%{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool 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 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# Export Path and make # Export Path and make
%{__make} clean make clean %{?_smp_mflags}
%{__make} libboinc_la_LIBADD="-L%{_libdir} -lssl -ldl" \ make libboinc_la_LIBADD="-L%{_libdir} -lssl -ldl" \
CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \ CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \
CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \ CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT" \
DESTDIR=%{_prefix} %{?_smp_mflags} DESTDIR=%{_prefix} %{?_smp_mflags}
@ -261,95 +259,95 @@ sed -i 's/\r//' clientgui/DlgItemProperties.cpp
# #
# hence we jump into clientgui and build it manually # hence we jump into clientgui and build it manually
pushd clientgui pushd clientgui
%{__make} libboinc_la_LIBADD="-L%{_libdir} -lssl -ldl" \ make libboinc_la_LIBADD="-L%{_libdir} -lssl -ldl" \
CFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT -lgtk-x11-2.0" \ 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" \ CXXFLAGS="%{optflags} -g -W -pipe -fno-strict-aliasing -D_REENTRANT -lgtk-x11-2.0" \
DESTDIR=%{_prefix} %{?_smp_mflags} DESTDIR=%{_prefix} %{?_smp_mflags}
popd popd
pushd locale pushd locale
%{__make} make %{?_smp_mflags}
popd popd
%install %install
%{makeinstall} make DESTDIR=%{buildroot} install %{?_smp_mflags}
for i in clientgui locale; do for i in clientgui locale; do
pushd $i pushd $i
%{makeinstall} make DESTDIR=%{buildroot} install %{?_smp_mflags}
popd popd
done done
# Creates default folders # Creates default folders
%{__install} -dm0755 %{buildroot}%{boinc_dir} install -dm0755 %{buildroot}%{boinc_dir}
%{__install} -dm0755 %{buildroot}%{_mandir}/man1 install -dm0755 %{buildroot}%{_mandir}/man1
# Remove old boinc & rename boinc_client to boinc-client # Remove old boinc & rename boinc_client to boinc-client
%{__rm} -f %{buildroot}%{_bindir}/boinc rm -f %{buildroot}%{_bindir}/boinc
%{__mv} -f %{buildroot}%{_bindir}/boinc_client %{buildroot}%{_bindir}/%{name} mv -f %{buildroot}%{_bindir}/boinc_client %{buildroot}%{_bindir}/%{name}
# Rename boincmgr and wrap it # Rename boincmgr and wrap it
%{__mv} %{buildroot}%{_bindir}/boincmgr %{buildroot}%{_bindir}/boinc-gui mv %{buildroot}%{_bindir}/boincmgr %{buildroot}%{_bindir}/boinc-gui
# Install boinc-manager wrapper script # Install boinc-manager wrapper script
%{__install} -Dm0755 %{S:6} %{buildroot}%{_bindir}/boinc-manager install -Dm0755 %{SOURCE6} %{buildroot}%{_bindir}/boinc-manager
# Use symlink instead of hardlink # Use symlink instead of hardlink
pushd %{buildroot}%{_bindir} pushd %{buildroot}%{_bindir}
%{__ln_s} -f %{name} boinc ln -s -f %{name} boinc
%{__ln_s} -f boinc-manager boincmgr ln -s -f boinc-manager boincmgr
%{__ln_s} -f boinc-manager boincmanager ln -s -f boinc-manager boincmanager
popd popd
# replace @boinc_dir@, @bindir@ # replace @boinc_dir@, @bindir@
%{__sed} -i \ sed -i \
-e "s,@boinc_dir@,%{boinc_dir},g" \ -e "s,@boinc_dir@,%{boinc_dir},g" \
-e "s,@bindir@,%{_bindir},g" \ -e "s,@bindir@,%{_bindir},g" \
%{buildroot}%{_bindir}/boinc-manager %{buildroot}%{_bindir}/boinc-manager
# Remove /etc/sysconfig/boinc-client, it is added by %%fillup_and_insserv # Remove /etc/sysconfig/boinc-client, it is added by %%fillup_and_insserv
%{__rm} -f %{buildroot}%{_sysconfdir}/sysconfig/%{name} rm -f %{buildroot}%{_sysconfdir}/sysconfig/%{name}
# Install init and create symlink for rcboinc # Install init and create symlink for rcboinc
%{__install} -D -m0644 %{S:20} %{buildroot}%{_unitdir}/%{name}.service install -D -m0644 %{SOURCE20} %{buildroot}%{_unitdir}/%{name}.service
mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
# And remove sysvinit script installed by boinc # And remove sysvinit script installed by boinc
%{__rm} -r %{buildroot}/%{_initrddir} rm -r %{buildroot}/%{_initddir}
# Install logrotate # Install logrotate
%{__install} -Dm0644 %{S:5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -Dm0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
# Install bash completion # Install bash completion
%{__install} -Dpm0644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc install -Dpm0644 client/scripts/boinc.bash %{buildroot}%{_sysconfdir}/bash_completion.d/boinc
# Install desktop-file and icons # Install desktop-file and icons
%{__install} -Dm0644 boinc-gui-128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/boinc-gui.png 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-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-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-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-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 -Dm0644 boinc-gui-16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/boinc-gui.png
# install icons # install icons
%{__install} -m0644 clientgui/res/boincmgr.16x16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/boincmanager.png 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.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 -m0644 clientgui/res/boincmgr.48x48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/boincmanager.png
# Install *.desktop File # Install *.desktop File
%suse_update_desktop_file -i boinc-gui Utility %suse_update_desktop_file -i boinc-gui Utility
# Remove static libraries, libtool archives # Remove static libraries, libtool archives
%{__rm} %{buildroot}%{_libdir}/*.{a,la} rm %{buildroot}%{_libdir}/*.{a,la}
# Relinking Manpages # Relinking Manpages
%{__ln_s} -f boincmgr.1.gz %{buildroot}%{_mandir}/man1/boinc-manager.1.gz 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 boinccmd.1.gz %{buildroot}%{_mandir}/man1/boinccmd.1.gz
%{__ln_s} -f boinc.1.gz %{buildroot}%{_mandir}/man1/boinc.1.gz ln -s -f boinc.1.gz %{buildroot}%{_mandir}/man1/boinc.1.gz
# Fix spurious-executable-perm # Fix spurious-executable-perm
%{__chmod} 0644 doc/*.php chmod 0644 doc/*.php
# Install fake /var/lib/boinc # Install fake /var/lib/boinc
%{__install} -dm0755 %{buildroot}%{_var}/lib/boinc install -dm0755 %{buildroot}%{_var}/lib/boinc
# Prepare $LANG Packages # Prepare $LANG Packages
%find_lang BOINC-Client %find_lang BOINC-Client
@ -364,7 +362,7 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%{_sbindir}/useradd -c "BOINC Client" -d "%{_localstatedir}/lib/boinc" \ %{_sbindir}/useradd -c "BOINC Client" -d "%{_localstatedir}/lib/boinc" \
-g boinc -r -s /sbin/nologin boinc 2>/dev/null || : -g boinc -r -s /sbin/nologin boinc 2>/dev/null || :
if [ -f %{_sysconfdir}/sysconfig/%{name} ]; then if [ -f %{_sysconfdir}/sysconfig/%{name} ]; then
if [ "$(grep "BOINC_BOINC_USR" /etc/sysconfig/boinc-client | grep -v grep >/dev/null; echo $?)" == 1 ]; then if [ "$(grep "BOINC_BOINC_USR" %{_sysconfdir}/sysconfig/boinc-client | grep -v grep >/dev/null; echo $?)" == 1 ]; then
mv -f %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/sysconfig/%{name}.save mv -f %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/sysconfig/%{name}.save
fi fi
fi fi
@ -381,13 +379,13 @@ fi
%service_del_postun %{name}.service %service_del_postun %{name}.service
%post -n boinc-manager %post -n boinc-manager
/usr/bin/touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi fi
%postun -n boinc-manager %postun -n boinc-manager
/usr/bin/touch --no-create %{_datadir}/icons/hicolor || : %{_bindir}/touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi fi
@ -434,8 +432,10 @@ fi
%{_mandir}/man1/boinc-manager.1.gz %{_mandir}/man1/boinc-manager.1.gz
%files -n %{name}-lang -f BOINC-Client.lang %files -n %{name}-lang -f BOINC-Client.lang
%defattr(-,root,root)
%files -n boinc-manager-lang -f BOINC-Manager.lang %files -n boinc-manager-lang -f BOINC-Manager.lang
%defattr(-,root,root)
%files -n libboinc%{soname} %files -n libboinc%{soname}
%defattr(-,root,root,-) %defattr(-,root,root,-)