%define package firefox-config
%define version 0.1
%define release 1.beta0

Name:           wpkg-%{package}
Version:        %{version}
Release:        %{release}%{?dist}
Summary:        %{package} for WPKG on iPasserelle

Group:          System/Softwares
URL:            http://www.ipasserelle.com
Source0:        %{name}-%{version}.tar.gz
License:        misc

BuildRoot:      /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArch:      noarch
BuildRequires:  unix2dos
BuildRequires:  e-smith-devtools

Requires:       ipasserelle-gp
Requires:	wpkg-firefox

%description
%{package} for WPKG on iPasserelle

%prep
%setup -q -n %{name}-%{version}

%build
perl createlinks
unix2dos packages/*

%install
/bin/rm -rf %{buildroot}
cp -a root %{buildroot}/
mkdir -p %{buildroot}/home/e-smith/files/shares/wpkg/files/settings/firefox
mkdir -p %{buildroot}/home/e-smith/files/shares/wpkg/files/packages
mkdir -p %{buildroot}/home/e-smith/files/shares/wpkg/files/softwares/firefox
cp -r softwares/* %{buildroot}/home/e-smith/files/shares/wpkg/files/softwares/firefox/
cp -r packages/* %{buildroot}/home/e-smith/files/shares/wpkg/files/packages/

%files
%defattr(-,root,root)
%doc CHANGELOG.git
/home/e-smith/files/shares/wpkg/files/
/etc/

%clean
/bin/rm -rf %{buildroot}

%changelog
* Mon Jun 25 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1-1
- Initial release