a star is born
This commit is contained in:
commit
77c6df909d
13
macros.web-assets
Normal file
13
macros.web-assets
Normal file
@ -0,0 +1,13 @@
|
||||
%_assetdir %{_datadir}/assets
|
||||
%_jsdir %{_datadir}/javascript
|
||||
|
||||
%js_includes() %{expand: \
|
||||
%(
|
||||
ver=$(rpm -q --qf='%%{version}' -- %1)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo "Provides: js-includes(%1) = $ver"
|
||||
else
|
||||
echo "Provides: js-includes(%1)"
|
||||
fi
|
||||
)
|
||||
}
|
||||
19
web-assets-LICENSE
Normal file
19
web-assets-LICENSE
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright 2013 T.C. Hollingsworth <tchollingsworth@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
5
web-assets.conf
Normal file
5
web-assets.conf
Normal file
@ -0,0 +1,5 @@
|
||||
Alias /assets /usr/share/assets
|
||||
|
||||
<Directory /usr/share/assets>
|
||||
Options -Indexes
|
||||
</Directory>
|
||||
82
web-assets.spec
Normal file
82
web-assets.spec
Normal file
@ -0,0 +1,82 @@
|
||||
Name: web-assets
|
||||
Version: 1
|
||||
Release: 1%{?dist}
|
||||
Summary: A simple framework for bits pushed to browsers
|
||||
BuildArch: noarch
|
||||
|
||||
License: MIT
|
||||
URL: https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/Web_Assets
|
||||
|
||||
Source1: web-assets-LICENSE
|
||||
Source2: macros.web-assets
|
||||
Source3: web-assets.conf
|
||||
|
||||
%description
|
||||
%{summary}.
|
||||
|
||||
%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
|
||||
%{summary}.
|
||||
|
||||
%package devel
|
||||
Summary: RPM macros for Web Assets packaging
|
||||
License: MIT
|
||||
Requires: web-assets-filesystem
|
||||
|
||||
%description devel
|
||||
%{summary}.
|
||||
|
||||
%package httpd
|
||||
Summary: Web Assets aliases for the Apache HTTP daemon
|
||||
License: MIT
|
||||
Requires: web-assets-filesystem
|
||||
Requires: httpd
|
||||
Requires(post): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
%description httpd
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -c -T
|
||||
cp %{SOURCE2} LICENSE
|
||||
|
||||
%build
|
||||
#nothing to do
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_datadir}/assets
|
||||
mkdir -p %{buildroot}%{_datadir}/javascript
|
||||
|
||||
ln -sf ../javascript %{buildroot}%{_datadir}/assets/javascript
|
||||
ln -sf ../fonts %{buildroot}%{_datadir}/assets/fonts
|
||||
|
||||
install -Dpm0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/macros.d/macros.web-assets
|
||||
install -Dpm0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/web-assets.conf
|
||||
|
||||
%post httpd
|
||||
systemctl reload-or-try-restart httpd.service || :
|
||||
|
||||
%postun httpd
|
||||
systemctl reload-or-try-restart httpd.service || :
|
||||
|
||||
%files filesystem
|
||||
%{_datadir}/assets
|
||||
%{_datadir}/javascript
|
||||
|
||||
%files devel
|
||||
%{_rpmconfigdir}/macros.d/macros.web-assets
|
||||
%doc LICENSE
|
||||
|
||||
%files httpd
|
||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/web-assets.conf
|
||||
%doc LICENSE
|
||||
|
||||
%changelog
|
||||
* Thu Jul 11 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1-1
|
||||
- initial package
|
||||
|
||||
Loading…
Reference in New Issue
Block a user