Blob Blame Raw
#disable the httpd stuff while we're waiting on getting the path issues
#cleared up
%global enable_httpd 1

Name:           web-assets
Version:        5
Release:        2%{?dist}
Summary:        A simple framework for bits pushed to browsers
BuildArch:      noarch

License:        MIT

Source1:        LICENSE
Source2:        macros.web-assets
Source3:        web-assets.conf
Source4:        README.devel


%package filesystem
Summary:        The basic directory layout for Web Assets
#there's nothing copyrightable about a few directories and symlinks
License:        Public Domain

%description filesystem

%package devel
Summary:        RPM macros for Web Assets packaging
License:        MIT
Requires:       web-assets-filesystem = %{version}-%{release}

%description devel

%if 0%{?enable_httpd}
%package httpd
Summary:        Web Assets aliases for the Apache HTTP daemon
License:        MIT
Requires:       web-assets-filesystem = %{version}-%{release}
Requires:       httpd
Requires(post): initscripts
Requires(postun): initscripts

%description httpd

%setup -c -T
cp %{SOURCE4} README.devel

#nothing to do

mkdir -p %{buildroot}%{_datadir}/web-assets
mkdir -p %{buildroot}%{_datadir}/javascript

ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/javascript
ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/js
ln -sf ../fonts %{buildroot}%{_datadir}/web-assets/fonts

install -Dpm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm/macros.web-assets

%if 0%{?enable_httpd}
install -Dpm0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/web-assets.conf

%post httpd
service httpd reload >/dev/null 2>&1 || :

%postun httpd
service httpd reload >/dev/null 2>&1 || :

%files filesystem

%files devel

%if 0%{?enable_httpd}
%files httpd
%config(noreplace) %{_sysconfdir}/httpd/conf.d/web-assets.conf

* Sat May 03 2014 T.C. Hollingsworth <> - 5-2
- silence service output in %%post

* Wed Mar 19 2014 T.C. Hollingsworth <> - 5-1
- switch to dot-prefixed Aliases
- order Aliases for compatibility with older Apache releases
- enable webfonts
- enable symlinks in %%{_webassetdir} and %%{_jsdir}
- re-enable httpd subpackage

* Tue Aug 27 2013 T.C. Hollingsworth <> - 4-3
- use old location for RPM macros on older releases

* Sat Aug 24 2013 T.C. Hollingsworth <> - 4-2
- tighten dependency on filesystem from other packages
- add brief README to -devel

* Fri Aug 16 2013 T.C. Hollingsworth <> - 4-1
- temporarily disable httpd stuff while we're waiting on sorting out the

* Tue Jul 30 2013 T.C. Hollingsworth <> - 3-1
- rename directories per discussion on lists
- provide a /_sysassets/js shortcut

* Fri Jul 19 2013 T.C. Hollingsworth <> - 2-1
- rename the license now that we have proper git
- prefix httpd-exported directory with an underscore (thanks to Joe Orton)
- add "Require all granted" (thanks to Remi Collet)
- alias /usr/share/javascript explictly

* Thu Jul 11 2013 T.C. Hollingsworth <> - 1-1
- initial package