77c6df9
Name:           web-assets
fecd0ba
Version:        3
77c6df9
Release:        1%{?dist}
77c6df9
Summary:        A simple framework for bits pushed to browsers
77c6df9
BuildArch:      noarch
77c6df9
77c6df9
License:        MIT
77c6df9
URL:            https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/Web_Assets
77c6df9
54b5384
Source1:        LICENSE
77c6df9
Source2:        macros.web-assets
77c6df9
Source3:        web-assets.conf
77c6df9
77c6df9
%description
77c6df9
%{summary}.
77c6df9
77c6df9
%package filesystem
77c6df9
Summary:        The basic directory layout for Web Assets
77c6df9
#there's nothing copyrightable about a few directories and symlinks
77c6df9
License:        Public Domain
77c6df9
77c6df9
%description filesystem
77c6df9
%{summary}.
77c6df9
77c6df9
%package devel
77c6df9
Summary:        RPM macros for Web Assets packaging
77c6df9
License:        MIT
77c6df9
Requires:       web-assets-filesystem
77c6df9
77c6df9
%description devel
77c6df9
%{summary}.
77c6df9
77c6df9
%package httpd
77c6df9
Summary:        Web Assets aliases for the Apache HTTP daemon
77c6df9
License:        MIT
77c6df9
Requires:       web-assets-filesystem
77c6df9
Requires:       httpd
77c6df9
Requires(post): systemd
77c6df9
Requires(postun): systemd
77c6df9
77c6df9
%description httpd
77c6df9
%{summary}.
77c6df9
77c6df9
%prep
77c6df9
%setup -c -T
54b5384
cp %{SOURCE1} LICENSE
77c6df9
77c6df9
%build
77c6df9
#nothing to do
77c6df9
77c6df9
%install
fecd0ba
mkdir -p %{buildroot}%{_datadir}/web-assets
77c6df9
mkdir -p %{buildroot}%{_datadir}/javascript
77c6df9
fecd0ba
ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/javascript
dcb45c1
ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/js
fecd0ba
ln -sf ../fonts %{buildroot}%{_datadir}/web-assets/fonts
77c6df9
77c6df9
install -Dpm0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/macros.d/macros.web-assets
77c6df9
install -Dpm0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/web-assets.conf
77c6df9
77c6df9
%post httpd
77c6df9
systemctl reload-or-try-restart httpd.service || :
77c6df9
77c6df9
%postun httpd
77c6df9
systemctl reload-or-try-restart httpd.service || :
77c6df9
77c6df9
%files filesystem
fecd0ba
%{_datadir}/web-assets
77c6df9
%{_datadir}/javascript
77c6df9
77c6df9
%files devel
77c6df9
%{_rpmconfigdir}/macros.d/macros.web-assets
77c6df9
%doc LICENSE
77c6df9
77c6df9
%files httpd
77c6df9
%config(noreplace) %{_sysconfdir}/httpd/conf.d/web-assets.conf
77c6df9
%doc LICENSE
77c6df9
77c6df9
%changelog
45164ba
* Fri Jul 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2-1
45164ba
- rename the license now that we have proper git
45164ba
- prefix httpd-exported directory with an underscore (thanks to Joe Orton)
45164ba
- add "Require all granted" (thanks to Remi Collet)
45164ba
- alias /usr/share/javascript explictly
45164ba
77c6df9
* Thu Jul 11 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1-1
77c6df9
- initial package