[barry] SPEC cleanup

Christopher Meng cicku at fedoraproject.org
Tue Feb 17 04:00:13 UTC 2015


commit bf16fa9c5d9a48309480557fac76370e7e037ff0
Author: Christopher Meng <i at cicku.me>
Date:   Tue Feb 17 11:59:42 2015 +0800

    SPEC cleanup

 barry.spec |  166 ++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 84 insertions(+), 82 deletions(-)
---
diff --git a/barry.spec b/barry.spec
index b4d95f8..d234f6d 100644
--- a/barry.spec
+++ b/barry.spec
@@ -2,8 +2,6 @@ Name:           barry
 Version:        0.18.4
 Release:        7%{?dist}
 Summary:        BlackBerry Desktop for Linux
-
-Group:          Applications/Productivity
 License:        GPLv2+
 URL:            http://www.netdirect.ca/software/packages/barry
 # The source for this package is often pulled from upstream's git.  Use the following
@@ -13,137 +11,144 @@ URL:            http://www.netdirect.ca/software/packages/barry
 # ./git-extract.sh 0 15 master
 # (cd build/barry* && ../../tar-prepare.sh)
 # (cd build && ../tar-create.sh 0 15)
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Source0:        http://downloads.sourceforge.net/projects/%{name}/%{name}/%{name}-%{version}/%{name}-%{version}.tar.bz2
-
-BuildRequires:  libusb-devel boost-devel desktop-file-utils gtkmm24-devel libxml++-devel
-BuildRequires:  libglademm24-devel libglade2-devel libtar-devel libtool
-BuildRequires:  fuse-devel gettext-devel doxygen autoconf zlib-devel
+BuildRequires:  autoconf
+BuildRequires:  automake
+BuildRequires:  boost-devel
+BuildRequires:  desktop-file-utils
+BuildRequires:  doxygen
+BuildRequires:  fuse-devel
+BuildRequires:  gettext-devel
+BuildRequires:  gtkmm24-devel
+BuildRequires:  libglade2-devel
+BuildRequires:  libglademm24-devel
+BuildRequires:  libtar-devel
+BuildRequires:  libtool
+BuildRequires:  libusb-devel
+BuildRequires:  libxml++-devel
+BuildRequires:  zlib-devel
+Requires:       hicolor-icon-theme
 Requires:       initscripts
 
 %description
 Barry is a desktop tool set for managing your BlackBerry device.
 
 This package contains command line tools which will enable you to charge your
-device with a proper 500mA and be able to access data on the device.  It also
+device with a proper 500mA and be able to access data on the device. It also
 includes a GUI application to backup your BlackBerry.
 
-%package libs
-Summary: BlackBerry Desktop for Linux - libraries
-Group: System Environment/Libraries
-Requires: pam module-init-tools
+%package        libs
+Summary:        Library files for %{name}
+Requires:       kmod
+Requires:       pam
 
-%description libs
-This package contains the library files, license agreement and README file.
+%description    libs
+This package contains the library files used by BlackBerry Desktop for Linux.
 
-%package devel
-Summary: BlackBerry Desktop for Linux - development libraries
-Group: Development/Libraries
-Requires: %{name}-libs = %{version}-%{release}
-Requires: libusb-devel boost-devel pkgconfig
+%package        devel
+Summary:        Development files for %{name}
+Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
+Requires:       boost-devel%{?_isa}
+Requires:       libusb-devel%{?_isa}
 
-%description devel
+%description    devel
 This package contains the development library files for Barry, barry-libs.
 
-%package devel-docs
-Summary: BlackBerry Desktop for Linux - development libraries documentation
-Group: Development/Libraries
-BuildArch: noarch
+%package        devel-docs
+Summary:        Development libraries documentation of %{name}
+BuildArch:      noarch
 
-%description devel-docs
+%description    devel-docs
 This package contains the documentation for the development library files for
 Barry.
 
-%package opensync
-Summary: BlackBerry Desktop for Linux - opensync plugin
-Group: Applications/Productivity
-BuildRequires: libopensync-devel
-Requires: libopensync = 1:0.22
+%package        opensync
+Summary:        Opensync plugin of BlackBerry Desktop for Linux
+BuildRequires:  libopensync-devel
+Requires:       libopensync = 1:0.22
 
-%description opensync
+%description    opensync
 This package contains the opensync plugin to synchronize your BlackBerry.
 
 %prep
 %setup -q
-%{__rm} -rf ./doc/www/*.php
-%{__rm} -rf ./doc/www/*.sh
+rm -frv ./doc/www/*.php
+rm -frv ./doc/www/*.sh
 #find ./doc/www/doxygen/html -type f -size 0 -name \*.map -exec rm '{}' \;
 
 %build
 # main tree
-%{configure} --enable-boost --with-zlib --disable-rpath
+%configure --enable-boost --with-zlib --disable-rpath
 #--disable-rpath doesn't seem effective
 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}
+%make_build
 
 # gui tree
-cd gui/
-%{configure} --disable-rpath PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
+pushd gui/
+%configure --disable-rpath PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
 #--disable-rpath doesn't seem effective
 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}
-cd ../
+%make_build
+popd
 
 # opensync tree
-cd opensync-plugin/
-%{configure} --disable-rpath PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
+pushd opensync-plugin/
+%configure --disable-rpath PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
 #--disable-rpath doesn't seem effective
 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}
-cd ../
+%make_build
+popd
 
 %install
 # main tree
-%{__make} DESTDIR=%{buildroot} install
+%make_install
 
-%{__mkdir_p} %{buildroot}%{_prefix}/lib/udev/rules.d
-%{__cp} udev/*.rules %{buildroot}%{_prefix}/lib/udev/rules.d/
+mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d
+cp udev/*.rules %{buildroot}%{_prefix}/lib/udev/rules.d/
 
-#%{__mkdir_p} %{buildroot}%{_sysconfdir}/security/console.perms.d
+#mkdir -p %{buildroot}%{_sysconfdir}/security/console.perms.d
 
-%{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d
-%{__cp} modprobe/blacklist-berry_charge.conf %{buildroot}%{_sysconfdir}/modprobe.d/
+mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
+cp modprobe/blacklist-berry_charge.conf %{buildroot}%{_sysconfdir}/modprobe.d/
 
-%{__mkdir_p} %{buildroot}%{_sysconfdir}/ppp/peers
-%{__cp} ppp/barry-* %{buildroot}%{_sysconfdir}/ppp/peers/
+mkdir -p %{buildroot}%{_sysconfdir}/ppp/peers
+cp ppp/barry-* %{buildroot}%{_sysconfdir}/ppp/peers/
 
-%{__mkdir_p} %{buildroot}%{_sysconfdir}/chatscripts
-%{__cp} ppp/barry-*.chat %{buildroot}%{_sysconfdir}/chatscripts/
+mkdir -p %{buildroot}%{_sysconfdir}/chatscripts
+cp ppp/barry-*.chat %{buildroot}%{_sysconfdir}/chatscripts/
 
 # Install hal fdi config
-%{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
-%{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
-%{__cp} hal/fdi/information/10freedesktop/10-blackberry.fdi %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
-#%{__cp} hal/fdi/policy/10osvendor/19-blackberry-acl.fdi %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
+mkdir -p %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
+mkdir -p %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
+cp hal/fdi/information/10freedesktop/10-blackberry.fdi %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
+#cp hal/fdi/policy/10osvendor/19-blackberry-acl.fdi %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
 
 # Install hal support script
-%{__mkdir_p} %{buildroot}%{_bindir}
-%{__cp} hal/hal-blackberry %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_bindir}
+cp hal/hal-blackberry %{buildroot}%{_bindir}
 
 %find_lang %{name}
 
 # gui tree
-cd gui/
-%{__make} DESTDIR=%{buildroot} install
-desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications/ ../menu/barrybackup.desktop
-%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
-install -p -m 0644 ../logo/barry_logo_icon.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
-cd ../
+pushd gui/
+%make_install
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ ../menu/barrybackup.desktop
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
+install -pm0644 ../logo/barry_logo_icon.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
+popd
 
 # opensync tree
-cd opensync-plugin/
-%{__make} DESTDIR=%{buildroot} install
-cd ../
+pushd opensync-plugin/
+%make_install
+popd
 
-%{__rm} -rf %{buildroot}%{_libdir}/opensync/plugins/*.la
-%{__rm} -rf %{buildroot}%{_libdir}/*.la
-%{__rm} -rf %{buildroot}%{_libdir}/*.a
+find %{buildroot} -name '*.la' -delete -print
 
-%files -f %{name}.lang 
-%defattr(-,root,root)
+%files -f %{name}.lang
+%license COPYING
 %{_sbindir}/*
 %{_bindir}/*
 %{_mandir}/man1/*
@@ -160,30 +165,27 @@ cd ../
 %config(noreplace) %{_sysconfdir}/chatscripts/*.chat
 
 %files libs
-%defattr(-,root,root)
 %{_libdir}/*.so.*
 %{_prefix}/lib/udev/rules.d/*
 #%config(noreplace) %{_sysconfdir}/security/console.perms.d/*
 %config(noreplace) %{_sysconfdir}/modprobe.d/blacklist-berry_charge.conf
-%doc AUTHORS ChangeLog COPYING NEWS README
+%doc AUTHORS ChangeLog NEWS README
+%license COPYING
 
 %files devel
-%defattr(-,root,root)
 %{_includedir}/barry18/
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/*.pc
-%doc COPYING TODO examples/*.cc examples/*.am
+%doc TODO examples/*.cc examples/*.am
+%license COPYING
 
 %files devel-docs
-%defattr(-,root,root)
-%doc COPYING doc/*
+%doc doc/*
 
 %files opensync
-%defattr(-,root,root)
 %{_libdir}/opensync/plugins/*
 %{_datadir}/opensync/defaults/*
-%doc COPYING
-
+%license COPYING
 
 %post
 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :


More information about the scm-commits mailing list