10f71cd
Name:		byobu
8961a7b
Version:	3.4
10f71cd
Release:	1%{?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
8961a7b
Patch0:		byobu-status.patch
10f71cd
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
10f71cd
BuildArch:	noarch
f241cf9
%if 0%{?rhel}
f241cf9
Requires:	python26
f241cf9
%else
f241cf9
Requires:	python >= 2.5
f241cf9
%endif
10f71cd
10f71cd
BuildRequires:	gettext, desktop-file-utils
f241cf9
Requires:	screen, newt, gettext
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
8961a7b
%patch0 -p0
8961a7b
find . -name "Makefile*" | xargs rm -f
10f71cd
# fix path
8961a7b
FILES="usr/share/man/man1/byobu-status.1 usr/share/byobu/tests/byobu-time-notifications usr/lib/byobu/updates_available"
10f71cd
for i in $FILES; do 
10f71cd
sed -i "s#usr/lib#%{_libexecdir}#g" $i;
10f71cd
done
10f71cd
# remove categories
10f71cd
sed -i "s/GNOME;GTK;//g" usr/share/applications/byobu.desktop
10f71cd
# fix path for po files
10f71cd
sed -i "s#gettext.bindtextdomain(PKG, SHARE+'/po')#gettext.bindtextdomain(PKG, '%{_datadir}/locale')#g" usr/bin/byobu-config
10f71cd
# fix path for help file
10f71cd
sed -i "s#DOC='/usr/share/doc/'+PKG#DOC='/usr/share/doc/'+PKG+'-%{version}'#g" usr/bin/byobu-config
766637b
# remove apport which is not available in fedora
766637b
rm usr/lib/byobu/apport
766637b
sed -i 's#status\[\"apport\"\]=0##g' usr/bin/byobu-config
766637b
# apply fedora default settings
766637b
cp -p %{SOURCE1} usr/share/byobu/windows/common
10f71cd
10f71cd
%build
10f71cd
10f71cd
%install
10f71cd
rm -rf %{buildroot}
10f71cd
mkdir -p %{buildroot}%{_libexecdir}
10f71cd
mkdir -p %{buildroot}%{_datadir}
10f71cd
mkdir -p %{buildroot}%{_bindir}
10f71cd
cp -par etc %{buildroot}/
10f71cd
cp -par usr/bin/* %{buildroot}%{_bindir}
10f71cd
cp -par usr/share/* %{buildroot}%{_datadir}
10f71cd
cp -par usr/lib/* %{buildroot}%{_libexecdir}/
10f71cd
rm -rf %{buildroot}%{_docdir}
10f71cd
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
10f71cd
%find_lang %{name}
10f71cd
10f71cd
%clean
10f71cd
rm -rf %{buildroot}
10f71cd
10f71cd
10f71cd
%files -f %{name}.lang
10f71cd
%defattr(-,root,root,-)
10f71cd
%doc README COPYING
10f71cd
%doc usr/share/doc/%{name}/help.txt
10f71cd
%dir %{_datadir}/%{name}
10f71cd
%dir %{_libexecdir}/%{name}
10f71cd
%dir %{_sysconfdir}/%{name}
10f71cd
%config(noreplace) %{_sysconfdir}/%{name}/*
10f71cd
%{_bindir}/%{name}*
766637b
%{_bindir}/shell
10f71cd
%{_datadir}/applications/%{name}.desktop
10f71cd
%{_datadir}/%{name}/*
766637b
%{_mandir}/man1/shell*
10f71cd
%{_mandir}/man1/%{name}*.1.gz
10f71cd
%{_libexecdir}/%{name}/*
10f71cd
10f71cd
%changelog
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