[web-assets/el5: 1/15] a star is born
T.C. Hollingsworth
patches at fedoraproject.org
Tue Aug 27 12:24:11 UTC 2013
commit 77c6df909d4ccd879ad200c356daae5f75f56bbe
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date: Fri Jul 19 04:26:37 2013 -0700
a star is born
macros.web-assets | 13 ++++++++
web-assets-LICENSE | 19 ++++++++++++
web-assets.conf | 5 +++
web-assets.spec | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 119 insertions(+), 0 deletions(-)
---
diff --git a/macros.web-assets b/macros.web-assets
new file mode 100644
index 0000000..687751c
--- /dev/null
+++ b/macros.web-assets
@@ -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
+)
+}
diff --git a/sources b/sources
new file mode 100644
index 0000000..e69de29
diff --git a/web-assets-LICENSE b/web-assets-LICENSE
new file mode 100644
index 0000000..17597ed
--- /dev/null
+++ b/web-assets-LICENSE
@@ -0,0 +1,19 @@
+Copyright 2013 T.C. Hollingsworth <tchollingsworth at 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.
diff --git a/web-assets.conf b/web-assets.conf
new file mode 100644
index 0000000..90732e9
--- /dev/null
+++ b/web-assets.conf
@@ -0,0 +1,5 @@
+Alias /assets /usr/share/assets
+
+<Directory /usr/share/assets>
+ Options -Indexes
+</Directory>
diff --git a/web-assets.spec b/web-assets.spec
new file mode 100644
index 0000000..0809317
--- /dev/null
+++ b/web-assets.spec
@@ -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 at gmail.com> - 1-1
+- initial package
+
More information about the scm-commits
mailing list