churchyard / rpms / byobu

Forked from rpms/byobu 2 years ago
Clone
Blob Blame History Raw
Name:		byobu
Version:	2.73
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
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch

BuildRequires:	gettext, desktop-file-utils
Requires:	screen, python >= 2.5, 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

# fix path
FILES="usr/share/man/man1/byobu-status.1 usr/share/byobu/tests/byobu-time-notifications usr/bin/byobu-status usr/bin/byobu-export 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='/usr/share/doc/'+PKG#DOC='/usr/share/doc/'+PKG+'-%{version}'#g" usr/bin/byobu-config

%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}/motd+shell
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}/*
%{_mandir}/man1/%{name}*.1.gz
%{_mandir}/man1/motd+shell.1.gz
%{_libexecdir}/%{name}/*

%changelog
* 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