Browse Source

web-assets package creation

Signed-off-by: webbuilder_pel7x64builder0 <webbuilder@powerel.org>
master
webbuilder_pel7x64builder0 5 years ago
parent
commit
893e3cfd1e
  1. 8
      SOURCES/README.devel
  2. 13
      SOURCES/macros.web-assets
  3. 43
      SOURCES/web-assets.conf
  4. 144
      SPECS/web-assets.spec

8
SOURCES/README.devel

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
web-assets-devel contains the RPM macros that implement the Fedora Web Assets
and JavaScript packaging policies.

For more information on packaging Web Assets, see:
https://fedoraproject.org/wiki/Packaging:Web_Assets

For more information on packaging JavaScript, see:
https://fedoraproject.org/wiki/Packaging:JavaScript

13
SOURCES/macros.web-assets

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
%_webassetdir %{_datadir}/web-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
)
}

43
SOURCES/web-assets.conf

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
<Directory /usr/share/web-assets>
Options -Indexes +FollowSymLinks
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>

<Directory /usr/share/javascript>
Options -Indexes +FollowSymLinks
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>

<Directory /usr/share/fonts>
Options -Indexes
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Allow from all
</IfModule>
</Directory>

Alias /.sysassets/fonts /usr/share/fonts
Alias /.sysassets/javascript /usr/share/javascript
Alias /.sysassets/js /usr/share/javascript
Alias /.sysassets /usr/share/web-assets

144
SPECS/web-assets.spec

@ -0,0 +1,144 @@ @@ -0,0 +1,144 @@
#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: 9%{?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: LICENSE
Source2: macros.web-assets
Source3: web-assets.conf
Source4: README.devel

%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 = %{version}-%{release}

%description devel
%{summary}.

%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): systemd
Requires(postun): systemd

%description httpd
%{summary}.
%endif

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

%build
#nothing to do

%install
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}%{_rpmconfigdir}/macros.d/macros.web-assets

%if 0%{?enable_httpd}
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 || :
%endif

%files filesystem
%{_datadir}/web-assets
%{_datadir}/javascript

%files devel
%{_rpmconfigdir}/macros.d/macros.web-assets
%doc LICENSE README.devel

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

%changelog
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Mar 19 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 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

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

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

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

* Fri Jul 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 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 <tchollingsworth@gmail.com> - 1-1
- initial package
Loading…
Cancel
Save