21254af
#disable the httpd stuff while we're waiting on getting the path issues
21254af
#cleared up
21254af
%global enable_httpd 0
21254af
77c6df9
Name:           web-assets
21254af
Version:        4
54bd960
Release:        2%{?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
62e5d15
Source4:        README.devel
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
54bd960
Requires:       web-assets-filesystem = %{version}-%{release}
77c6df9
77c6df9
%description devel
77c6df9
%{summary}.
77c6df9
21254af
%if 0%{?enable_httpd}
77c6df9
%package httpd
77c6df9
Summary:        Web Assets aliases for the Apache HTTP daemon
77c6df9
License:        MIT
54bd960
Requires:       web-assets-filesystem = %{version}-%{release}
77c6df9
Requires:       httpd
77c6df9
Requires(post): systemd
77c6df9
Requires(postun): systemd
77c6df9
77c6df9
%description httpd
77c6df9
%{summary}.
21254af
%endif
77c6df9
77c6df9
%prep
77c6df9
%setup -c -T
54b5384
cp %{SOURCE1} LICENSE
62e5d15
cp %{SOURCE4} README.devel
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
21254af
21254af
%if 0%{?enable_httpd}
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 || :
21254af
%endif
77c6df9
77c6df9
%files filesystem
fecd0ba
%{_datadir}/web-assets
77c6df9
%{_datadir}/javascript
77c6df9
77c6df9
%files devel
77c6df9
%{_rpmconfigdir}/macros.d/macros.web-assets
62e5d15
%doc LICENSE README.devel
77c6df9
21254af
%if 0%{?enable_httpd}
77c6df9
%files httpd
77c6df9
%config(noreplace) %{_sysconfdir}/httpd/conf.d/web-assets.conf
77c6df9
%doc LICENSE
21254af
%endif
77c6df9
77c6df9
%changelog
54bd960
* Sat Aug 24 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 4-2
54bd960
- tighten dependency on filesystem from other packages
62e5d15
- add brief README to -devel
54bd960
21254af
* Fri Aug 16 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 4-1
21254af
- temporarily disable httpd stuff while we're waiting on sorting out the
21254af
  directory
21254af
51f669e
* Tue Jul 30 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 3-1
51f669e
- rename directories per discussion on lists
51f669e
- provide a /_sysassets/js shortcut
51f669e
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