Summary: Lightweight desktop panel
Summary(ja): 軽量デスクトップパネル
Name:           fbpanel
Version:        6.1
Release:        2%{?_dist_release}
# %%{_bindir}/fbpanel-bin and almost all plugins are under LGPLv2+
# Some plugins (cpu.so, pager.so, tray.so) are under GPLv2+
License:        LGPLv2+, GPLv2+
URL:            http://fbpanel.sourceforge.net/
Group:          User Interface/X
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       TANAKA hiroaki <mosaicist@jcom.home.ne.jp>
BuildRequires:  gtk2-devel libXpm-devel libXmu-devel desktop-file-utils
###BuildRequires:  gdk-pixbuf2-devel
Requires:       fontconfig, freetype2, ncurses, zenity
Source0:        http://sourceforge.net/projects/fbpanel/files/%{name}/%version}/%{name}-%{version}.tbz2
# icons
Source10:       fbpanel_data.tar.bz2
# utils
Source11:       fbpanel_exec.tar.bz2
# start script
Source12:       fbpanel_start
# additional icons
Patch1:         fbpanel-6.0-icons.patch
# default apps
Patch2:         fbpanel-6.0-mkprof.patch
# default configuration
Patch3:         fbpanel-6.1-default_in.patch
# logout script
Patch4:         fbpanel-6.0-xlogout.patch
# additional utils
Patch5:         fbpanel-6.0-exec.patch
# binary name (fbpanel -> fbpanel-bin)
Patch6:         fbpanel-6.0-panname.patch

%description
Fbpanel is a lightweight, NETWM(wm-spec) compliant desktop panel. It works with any NETWM compliant window manager
%description -l ja
FBpanel は NETWM(wm-spec)準拠のウィンドウマネージャ環境で作動する軽量デスクトップパネルです。


%prep

%setup -q -a 10 -a 11
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

%build

%__rm -rf %{buildroot}

CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
LDFLAGS="${LDFLAGS} -lX11 -lm"  ; export LDFLAGS
./configure \
    --host=%{_host} --build=%{_build} \
    --target=%{_target_platform} \
    --prefix=%{_prefix} \
    --bindir=%{_bindir} \
    --datadir=%{_datadir} \
    --libdir=%{_libdir} \
    --mandir=%{_mandir} \

%__make

%{__gzip} data/man/fbpanel.1

%install

%__make "DESTDIR=%{buildroot}" install

# install manpage
%{__mkdir_p} %{buildroot}%{_mandir}/man1/
%{__install} -m 644 data/man/%{name}.1.gz %{buildroot}%{_mandir}/man1/
# install startup script
%{__install} -m 755 %{SOURCE12} %{buildroot}%{_bindir}/fbpanel
# install README.ja
%{__install} -m 644 data/README.ja %{buildroot}%{_datadir}/%{name}/
# install desktop-entry
%{__mkdir_p} %{buildroot}%{_datadir}/applications/
%__cat > %{buildroot}%{_datadir}/applications/%{name}.desktop <<EOF
[Desktop Entry]
Name=FbPanel
Name[ja]=FbPanel
Comment=FbPanel
Comment[ja]=軽量デスクトップパネル
Exec=fbpanel
Icon=/usr/share/fbpanel/images/vine.svg
Terminal=false
MultipleArgs=false
Type=Application
Categories=Application;Utility;
EOF


%clean

rm -rf %{buildroot}


%files
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/*
%{_libexecdir}/*
%{_datadir}/*


%changelog
* Sun Dec 29 2013 TANAKA hiroaki <mosaicist@jcom.home.ne.jp> 6.1-2
- rebuild with gcc-4.8

* Fri Mar 23 2012 KATO Masashi <mkato@par.odn.ne.jp> 6.1-1
- upstream update
- removed BR: gdk-pixbuf2-devel
- added linker option "-lm"
- updated Patch3 (fbpanel-6.1-default_in.patch)

* Sat Mar 10 2012 KATO Masashi <mkato@par.odn.ne.jp> 6.0-2
- changed BR: gdk-pixbuf-devel with gdk-pixbuf2-devel
- added linker option "-lX11"

* Wed May 26 2010 KATO Masashi <mkato@par.odn.ne.jp> 6.0-1
- upstream update
- added icons (Source10 & Patch1)
- arranged default config file (Patch2, Patch3)
- added & arranged util-scripts (Source11 & Patch4, Patch5)
- added startup script

* Mon Mar 22 2010 KATO Masashi <mkato@par.odn.ne.jp> 5.6-1
- initial build for Vine Linux
