a7b75ea
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
0722a74
# define icons directories...
0722a74
%define _iconstheme    hicolor
0722a74
%define _iconsbasedir  %{_datadir}/icons/%{_iconstheme}
0722a74
%define _iconsscaldir  %{_iconsbasedir}/scalable/apps
a7b75ea
10f71cd
Name:		byobu
0b3579b
Version:	5.73
12d0732
Release:	4%{?dist}
10f71cd
Summary:	Light-weight, configurable window manager built upon GNU screen
10f71cd
10f71cd
Group:		Applications/System
10f71cd
License:	GPLv3
10f71cd
URL:		http://launchpad.net/byobu
10f71cd
Source0:	http://code.launchpad.net/byobu/trunk/%{version}/+download/byobu_%{version}.orig.tar.gz
766637b
# default windows
766637b
Source1:	fedoracommon
17f12e5
# patch for wrong logo on RHEL, https://bugs.launchpad.net/byobu/+bug/1278006
17f12e5
Patch0:		byobu-5.73-logo.patch
17f12e5
# patch for incorrect shell detection, https://bugs.launchpad.net/byobu/+bug/1280550 
17f12e5
Patch1:		byobu-5.73-bash.patch
17f12e5
# patch for "hard" date/time, https://bugs.launchpad.net/byobu/+bug/1284392
17f12e5
Patch2:		byobu-5.73-tmux_date.patch
d29eaf3
# patch for multiple sourcing, https://bugs.launchpad.net/byobu/+bug/1273685
d29eaf3
Patch3:		byobu-5.73-tmuxrc_source.patch
12d0732
# patch for crashing byobu-config, https://bugs.launchpad.net/byobu/+bug/1286249
12d0732
Patch4:		byobu-5.73-config_except.patch
10f71cd
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
10f71cd
BuildArch:	noarch
e82ebc3
%if 0%{?rhel}%{?fedora} > 5
f241cf9
Requires:	python >= 2.5
e82ebc3
%else
e82ebc3
Requires:	python26
f241cf9
%endif
10f71cd
ff1dfe8
BuildRequires:	gettext, desktop-file-utils, automake
4bfda02
Requires:	screen, newt, gettext, tmux
10f71cd
10f71cd
%Description
10f71cd
Byobu is a Japanese term for decorative, multi-panel screens that serve 
10f71cd
as folding room dividers. As an open source project, Byobu is an 
10f71cd
elegant enhancement of the otherwise functional, plain, 
10f71cd
practical GNU Screen. Byobu includes an enhanced profile 
10f71cd
and configuration utilities for the GNU screen window manager, 
10f71cd
such as toggle-able system status notifications.
10f71cd
10f71cd
%prep
10f71cd
%setup -q
cb3201c
# remove swap file
af907d0
if [ -e "usr/bin/.byobu-status-print.swp" ]; then rm usr/bin/.byobu-status-print.swp
af907d0
fi
ff1dfe8
# fix path for lib directory in scripts
ff1dfe8
for i in `grep -Ri {BYOBU_PREFIX}/lib/ * | awk -F: '{print $1}' | uniq`; do
ff1dfe8
sed -i "s#{BYOBU_PREFIX}/lib/#{BYOBU_PREFIX}/libexec/#g" $i;
10f71cd
done
e82ebc3
for i in `grep -Ri BYOBU_PREFIX/lib/ * | awk -F: '{print $1}' | uniq`; do
e82ebc3
sed -i "s#BYOBU_PREFIX/lib/#BYOBU_PREFIX/libexec/#g" $i;
e82ebc3
done
4bfda02
17f12e5
# apply patches
17f12e5
%patch0
17f12e5
%patch1
17f12e5
%patch2
d29eaf3
%patch3
12d0732
%patch4
17f12e5
4bfda02
# fix path for correct directory in /usr/share
4bfda02
sed -i "s#DOC = BYOBU_PREFIX + '/share/doc/' + PKG#DOC='%{_pkgdocdir}'#g" usr/lib/byobu/include/config.py
4bfda02
ff1dfe8
# set default fedora windows
766637b
cp -p %{SOURCE1} usr/share/byobu/windows/common
4bfda02
52cd5d5
# fix path from lib to libexec by modified Makefile.am and in
ff1dfe8
sed -i "s#/lib/#/libexec/#g" usr/lib/byobu/Makefile.am
52cd5d5
sed -i "s#/lib/#/libexec/#g" usr/lib/byobu/Makefile.in
52cd5d5
sed -i "s#/lib/#/libexec/#g" usr/lib/byobu/include/Makefile.am
52cd5d5
sed -i "s#/lib/#/libexec/#g" usr/lib/byobu/include/Makefile.in
10f71cd
10f71cd
%build
ff1dfe8
%configure
ff1dfe8
make %{?_smp_mflags}
10f71cd
10f71cd
%install
10f71cd
rm -rf %{buildroot}
a7b75ea
make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" docdir=%{_pkgdocdir} install
52cd5d5
rm -rf %{buildroot}%{_sysconfdir}/profile.d
ff1dfe8
# remove apport which is not available in fedora
52cd5d5
rm %{buildroot}/%{_libexecdir}/%{name}/apport
ff1dfe8
sed -i 's#status\[\"apport\"\]=0##g' %{buildroot}%{_bindir}/byobu-config
a7b75ea
cp -p README COPYING %{buildroot}%{_pkgdocdir}
10f71cd
for po in po/*.po
10f71cd
do
10f71cd
    lang=${po#po/}
10f71cd
    lang=${lang%.po}
10f71cd
    mkdir -p %{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/
10f71cd
    msgfmt ${po} -o %{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/%{name}.mo
10f71cd
done
10f71cd
desktop-file-install usr/share/applications/%{name}.desktop --dir %{buildroot}%{_datadir}/applications
10f71cd
0722a74
# add icon into /usr/share/icons/hicolor/scalable/apps/ from /usr/share/byobu/pixmaps/byobu.svg
0722a74
mkdir -p %{buildroot}%{_iconsscaldir}
0722a74
cp -p usr/share/byobu/pixmaps/byobu.svg %{buildroot}%{_iconsscaldir}
0722a74
10f71cd
%find_lang %{name}
10f71cd
10f71cd
%clean
ff1dfe8
rm -rf %{buildroot}
10f71cd
0722a74
%post
0722a74
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
0722a74
0722a74
%postun
0722a74
if [ $1 -eq 0 ] ; then
0722a74
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
0722a74
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
0722a74
fi
0722a74
0722a74
%posttrans
0722a74
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
0722a74
10f71cd
10f71cd
%files -f %{name}.lang
10f71cd
%defattr(-,root,root,-)
10f71cd
%dir %{_datadir}/%{name}
10f71cd
%dir %{_libexecdir}/%{name}
52cd5d5
%dir %{_sysconfdir}/%{name}
a7b75ea
%dir %{_pkgdocdir}
0722a74
%{_iconsscaldir}/%{name}.svg
a7b75ea
%{_pkgdocdir}/*
10f71cd
%{_bindir}/%{name}*
ec771fa
%if 0%{?rhel} == 5
ec771fa
%{_datadir}/applications/*.desktop
ec771fa
%else
10f71cd
%{_datadir}/applications/%{name}.desktop
ec771fa
%endif
10f71cd
%{_datadir}/%{name}/*
10f71cd
%{_mandir}/man1/%{name}*.1.gz
10f71cd
%{_libexecdir}/%{name}/*
52cd5d5
%config(noreplace) %{_sysconfdir}/%{name}/*
10f71cd
10f71cd
%changelog
12d0732
* Fri Feb 28 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.73-4
12d0732
- patch for issue with missing ~/.byobu/status leading to crash in byobu-config
12d0732
d29eaf3
* Thu Feb 27 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.73-3
d29eaf3
- various upstream patches
d29eaf3
17f12e5
* Wed Feb 26 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.73-2
17f12e5
- various upstream patches
17f12e5
0b3579b
* Tue Feb 18 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.73-1
0b3579b
- Update to latest release 
0b3579b
0722a74
* Thu Jan 9 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.69-2
0722a74
- added icon (#1013240)
0722a74
4bfda02
* Wed Jan 8 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.69-1
4bfda02
- update to latest version (#873560)
4bfda02
- added tmux dependency (#907267)
4bfda02
a7b75ea
* Thu Dec 12 2013 Ville Skyttä <ville.skytta@iki.fi> - 5.21-7
a7b75ea
- Install docs to %%{_pkgdocdir} where available (#993689).
a7b75ea
- Fix bogus dates in %%changelog.
a7b75ea
30261ec
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.21-6
30261ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
30261ec
74fa30d
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.21-5
74fa30d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
74fa30d
b7d9057
* Sat Aug 25 2012 Jan Klepek <jan.klepek at, gmail.com> - 5.21-4 
b7d9057
- desktop file handling fixed
b7d9057
a2f27db
* Sat Aug 25 2012 Jan Klepek <jan.klepek at, gmail.com> - 5.21-3
a2f27db
- another fix into documentation
a2f27db
a7b75ea
* Sun Aug 19 2012 Jan Klepek <jan.klepek at, gmail.com> - 5.21-2
9650674
- fixed documentation
9650674
a7b75ea
* Sun Aug 19 2012 Jan Klepek <jan.klepek at, gmail.com> - 5.21-1
e21e711
- new minor release
e21e711
0726c8b
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.17-2
0726c8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0726c8b
52cd5d5
* Sun Apr 08 2012 Jan Klepek <jan.klepek at, gmail.com> - 5.17-1
52cd5d5
- update to latest version
52cd5d5
1580641
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.41-2
1580641
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1580641
af907d0
* Sat Oct 15 2011 Jan Klepek <jan.klepek at, gmail.com> - 4.41-1
af907d0
- update to 4.41
af907d0
cb3201c
* Mon Aug 1 2011 Jan Klepek <jan.klepek at, gmail.com> - 4.23-1
cb3201c
- update to 4.23
cb3201c
e82ebc3
* Sat Jul 23 2011 Jan Klepek <jan.klepek at, gmail.com> - 4.22-2
e82ebc3
- updated to 4.22 + various bugfixes
e82ebc3
e82ebc3
* Sat Jul 23 2011 Jan Klepek <jan.klepek at, gmail.com> - 4.20-1
ff1dfe8
- new major release
1fa2aa7
fad7306
* Sat Jan 8 2011 Jan Klepek <jan.klepek at, gmail.com> - 3.21-1
fad7306
- new release
fad7306
fad7306
* Sat Dec 18 2010 Jan Klepek <jan.klepek at, gmail.com> - 3.20-2
fad7306
- upgrade to 3.20 + some patches
3a66e67
8961a7b
* Fri Sep 3 2010 Jan Klepek <jan.klepek at, gmail.com> - 3.4-1
8961a7b
- upgraded to 3.4
8961a7b
766637b
* Thu Jun 17 2010 Jan Klepek - 2.80-1
766637b
- bugfix for BZ#595087, changed default windows selection, removed apport from toggle status notification
766637b
- upgraded to 2.80 version
766637b
10f71cd
* Sun May 2 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.73-1
10f71cd
- new version released
10f71cd
10f71cd
* Wed Apr 21 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.67-3
10f71cd
- adjusted SHARE path
10f71cd
10f71cd
* Tue Apr 20 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.67-2
10f71cd
- adjusted path for looking for po files and removed duplicate file entry
10f71cd
10f71cd
* Fri Apr 2 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.67-1
10f71cd
- Initial fedora RPM release