Blob Blame Raw
Name:		byobu
Version:	3.20
Release:	1%{?dist}
Summary:	Light-weight, configurable window manager built upon GNU screen

Group:		Applications/System
License:	GPLv3
URL:		http://launchpad.net/byobu
Source0:	http://code.launchpad.net/byobu/trunk/%{version}/+download/byobu_%{version}.orig.tar.gz
# default windows
Source1:	fedoracommon
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
%if 0%{?rhel}
Requires:	python26
%else
Requires:	python >= 2.5
%endif

BuildRequires:	gettext, desktop-file-utils
Requires:	screen, newt, gettext

%Description
Byobu is a Japanese term for decorative, multi-panel screens that serve 
as folding room dividers. As an open source project, Byobu is an 
elegant enhancement of the otherwise functional, plain, 
practical GNU Screen. Byobu includes an enhanced profile 
and configuration utilities for the GNU screen window manager, 
such as toggle-able system status notifications.

%prep
%setup -q
find . -name "Makefile*" | xargs rm -f
# fix path
FILES="usr/share/man/man1/byobu-status.1 usr/share/byobu/tests/byobu-time-notifications usr/lib/byobu/updates_available"
for i in $FILES; do 
sed -i "s#usr/lib#%{_libexecdir}#g" $i;
done
# remove categories
sed -i "s/GNOME;GTK;//g" usr/share/applications/byobu.desktop
# fix path for po files
sed -i "s#gettext.bindtextdomain(PKG, SHARE+'/po')#gettext.bindtextdomain(PKG, '%{_datadir}/locale')#g" usr/bin/byobu-config
# fix path for help file
sed -i "s#DOC=PREFIX+'/share/doc/'+PKG#DOC=PREFIX+'/share/doc/'+PKG+'-%{version}'#g" usr/bin/byobu-config
# remove apport which is not available in fedora
rm usr/lib/byobu/apport
sed -i 's#status\[\"apport\"\]=0##g' usr/bin/byobu-config
# apply fedora default settings
cp -p %{SOURCE1} usr/share/byobu/windows/common

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libexecdir}
mkdir -p %{buildroot}%{_datadir}
mkdir -p %{buildroot}%{_bindir}
cp -par etc %{buildroot}/
cp -par usr/bin/* %{buildroot}%{_bindir}
cp -par usr/share/* %{buildroot}%{_datadir}
cp -par usr/lib/* %{buildroot}%{_libexecdir}/
rm -rf %{buildroot}%{_docdir}

for po in po/*.po
do
    lang=${po#po/}
    lang=${lang%.po}
    mkdir -p %{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/
    msgfmt ${po} -o %{buildroot}%{_datadir}/locale/${lang}/LC_MESSAGES/%{name}.mo
done
desktop-file-install usr/share/applications/%{name}.desktop --dir %{buildroot}%{_datadir}/applications

%find_lang %{name}

%clean
rm -rf %{buildroot}


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README COPYING
%doc usr/share/doc/%{name}/help.txt
%dir %{_datadir}/%{name}
%dir %{_libexecdir}/%{name}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*
%{_bindir}/%{name}*
%{_bindir}/shell
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}/*
%{_mandir}/man1/shell*
%{_mandir}/man1/%{name}*.1.gz
%{_libexecdir}/%{name}/*
%{_libexecdir}/%{name}/.notify_osd

%changelog
* Sat Dec 18 2010 Jan Klepek <jan.klepek at, gmail.com> - 3.20-1
- upgrade to 3.20

* Fri Sep 3 2010 Jan Klepek <jan.klepek at, gmail.com> - 3.4-1
- upgraded to 3.4

* Thu Jun 17 2010 Jan Klepek - 2.80-1
- bugfix for BZ#595087, changed default windows selection, removed apport from toggle status notification
- upgraded to 2.80 version

* Sun May 2 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.73-1
- new version released

* Wed Apr 21 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.67-3
- adjusted SHARE path

* Tue Apr 20 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.67-2
- adjusted path for looking for po files and removed duplicate file entry

* Fri Apr 2 2010 Jan Klepek <jan.klepek at, gmail.com> - 2.67-1
- Initial fedora RPM release