prepare packages in tests for passerelle 0.5

This commit is contained in:
Thomas NOËL 2014-10-20 10:28:33 +02:00
parent 6c738f58af
commit 0c23bb5937
18 changed files with 499 additions and 0 deletions

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontawesome-fonts-4.1.0-1.fc21.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/f/fontpackages-1.44-10.fc21.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">pypi.python.org</param>
<param name="protocol">https</param>
<param name="path">/packages/source/X/XStatic-Font-Awesome/XStatic-Font-Awesome-4.1.0.0.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,76 @@
%global pypi_name XStatic-Font-Awesome
%{!?__python2:%global __python2 %{__python}}
Name: python-%{pypi_name}
Version: 4.1.0.0
Release: 2%{?dist}
Summary: Font-Awesome (XStatic packaging standard)
# font awesome is licensed under SIL 1.1.
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses_4
# short name: OFL
# Code is distributed under MIT
License: OFL and MIT
URL: https://fortawesome.github.io/Font-Awesome/
Source0: https://pypi.python.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: web-assets-devel
BuildRequires: fontawesome-fonts
Requires: python-XStatic
Requires: web-assets-filesystem
Requires: fontawesome-fonts-web >= 4.1.0
Requires: fontawesome-fonts
%description
Font Awesome icons packaged for setuptools (easy_install) / pip.
This package is intended to be used by any project that needs these files.
It intentionally does not provide any extra code
except some metadata nor has any extra requirements.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
# use fontawesome-fonts directly
rm -f %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/fonts/*
ln -s %{_datadir}/fonts/fontawesome/* %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/fonts/
# use fontawesome-fonts-web for css, scss,
for dir in css less scss ; do
rm -rf %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/$dir
ln -s %{_datadir}/font-awesome-web/$dir %{buildroot}/%{python_sitelib}/xstatic/pkg/font_awesome/data/$dir
done
%files
%doc README.txt
%{python_sitelib}/xstatic/pkg/font_awesome
%{python_sitelib}/XStatic_Font_Awesome-%{version}-py%{python_version}.egg-info
%{python_sitelib}/XStatic_Font_Awesome-%{version}-py%{python_version}-nspkg.pth
%changelog
* Wed Oct 01 2014 Matthias Runge <mrunge@redhat.com> - 4.1.0.0-2
- require at least version 4.1.0 of fontawesome-fonts-web
* Wed Sep 10 2014 Matthias Runge <mrunge@redhat.com> - 4.1.0.0-1
- Initial package. (rhbz#1140377)

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/p/python-XStatic-jQuery-1.10.2.1-1.fc22.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">pypi.python.org</param>
<param name="protocol">https</param>
<param name="path">/packages/source/X/XStatic-jquery-ui/XStatic-jquery-ui-1.10.4.1.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,70 @@
%global pypi_name XStatic-jquery-ui
%global _jsdir %{_datadir}/javascript
%{!?__python2:%global __python2 %{__python}}
%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
%{!?python2_version: %global python2_version %{python_version}}
Name: python-%{pypi_name}
Version: 1.10.4.1
Release: 1%{?dist}
Summary: jquery-ui (XStatic packaging standard)
# According
# https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
# http://creativecommons.org/publicdomain/zero/1.0/legalcode
# is abbreviated CCO.
# This package has the same license as jquery-ui:
# https://github.com/jquery/jqueryui.com/blob/master/LICENSE.txt
License: CCO
URL: http://jqueryui.com/
Source0: https://pypi.python.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: web-assets-devel
Requires: python-XStatic
Requires: web-assets-filesystem
%description
jquery-ui javascript library packaged for
setuptools (easy_install) / pip.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# patch to use webassets dir
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/jquery_ui'|" xstatic/pkg/jquery_ui/__init__.py
%build
# due
# https://bitbucket.org/thomaswaldmann/xstatic/issue/2/
# this package can not be built with python-XStatic installed.
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
mkdir -p %{buildroot}/%{_jsdir}/jquery_ui
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/jquery_ui/data/* %{buildroot}/%{_jsdir}/jquery_ui
%files
%doc README.txt
%{python2_sitelib}/xstatic/pkg/jquery_ui
%{python2_sitelib}/XStatic_jquery_ui-1.10.4.1-py%{python_version}.egg-info
%{python2_sitelib}/XStatic_jquery_ui-1.10.4.1-py%{python_version}-nspkg.pth
%{_jsdir}/jquery_ui
%changelog
* Mon Aug 18 2014 Matthias Runge <mrunge@redhat.com> - 1.10.4.1-1
- Initial package (rhbz#1135430).

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">http</param>
<param name="path">/linux/fedora/linux/development/rawhide/source/SRPMS/p/python-XStatic-1.0.1-2.fc22.src.rpm</param>
</service>
</services>

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">repos.entrouvert.org</param>
<param name="protocol">http</param>
<param name="path">/gadjo.git/snapshot/gadjo-3425188.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,49 @@
%define tag 0.2
%define commit 3425188
# si possible, minor = nombre de commit depuis le tag (à la "git describe")
%define minor 22
# si minor == 0
#%define version %{tag}
# sinon :
%define version %{tag}.%{minor}.g%{commit}
# %define _unpackaged_files_terminate_build 0
Name: python-django-gadjo
Version: %{tag}.%{minor}.g%{commit}
Release: 9%{?dist}
Summary: Django base template tailored for management interfaces
Group: Development/Languages
License: AGPLv3
URL: https://dev.entrouvert.org/projects/gadjo
Source0: gadjo-%{commit}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python-django python-setuptools-devel
Requires: python-django python-XStatic python-XStatic-Font-Awesome python-XStatic-jQuery python-XStatic-jquery-ui
%description
Gadjo is a base template for Django applications, tailored for
management interfaces, built to provide a nice and modern look, while
using progressive enhancement and responsive designs to adapt to
different environments.
%prep
%setup -q -n gadjo-%{commit}
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%files
%{python_sitelib}/gadjo
%{python_sitelib}/gadjo-*.egg-info
%doc COPYING README.txt AUTHORS
%changelog
* Sat Oct 18 2014 Entr'ouvert <info@entrouvert.org> - 0-1
- Initial release

View File

@ -0,0 +1,7 @@
<services>
<service name="download_url">
<param name="host">pypi.python.org</param>
<param name="protocol">http</param>
<param name="path">/packages/source/d/django-jsonfield/django-jsonfield-0.9.13.tar.gz</param>
</service>
</services>

View File

@ -0,0 +1,35 @@
Name: python-django-jsonfield
Version: 0.9.13
Release: 1%{?dist}
Summary: JSONField for django models
Group: Development/Languages
License: BSD
URL: http://pypi.python.org/pypi/django-jsonfield
Source: http://pypi.python.org/packages/source/d/django-jsonfield/django-jsonfield-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools-devel
Requires: python-django
%description
JSONField for django models
%prep
%setup -q -n django-jsonfield-%{version}
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%files
%{python_sitelib}/jsonfield
%doc LICENSE README.rst
%{python_sitelib}/django_jsonfield-%{version}-py?.?.egg-info
%changelog
* Sat Oct 18 2014 Entr'ouvert <info@entrouvert.org> - 0.9.13-1
- Initial release

View File

@ -0,0 +1,7 @@
<services>
<service name="download_src_package">
<param name="host">fr2.rpmfind.net</param>
<param name="protocol">ftp</param>
<param name="path">linux/fedora/linux/development/rawhide/source/SRPMS/t/ttembed-1.1-3.fc22.src.rpm</param>
</service>
</services>

View 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.

View File

@ -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

View File

@ -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
)
}

View File

@ -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

View File

@ -0,0 +1,123 @@
#disable the httpd stuff while we're waiting on getting the path issues
#cleared up
%global enable_httpd 0
Name: web-assets
Version: 5
Release: 2%{?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 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