mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 00:21:23 +00:00
new rpm rules
This commit is contained in:
parent
d81b6f855e
commit
242e3c4add
69
installers/rpm_package_build/bench.spec.i686
Normal file
69
installers/rpm_package_build/bench.spec.i686
Normal file
@ -0,0 +1,69 @@
|
||||
%define name bench
|
||||
%define version 0.92
|
||||
%define unmangled_version 0.92
|
||||
%define unmangled_version 0.92
|
||||
%define release 1
|
||||
%define _buildshell /bin/bash
|
||||
|
||||
Summary: Metadata driven, full-stack web framework
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Source0: %{name}-%{unmangled_version}.tar.gz
|
||||
License: GPL
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
BuildArch: i686
|
||||
Vendor: Frappe Technologies <info@frappe.io>
|
||||
Url: https://github.com/frappe/bench
|
||||
|
||||
# for building/installing the package
|
||||
BuildRequires: python
|
||||
|
||||
# centos 6 dependencies
|
||||
%if 0%{rhel} == 6
|
||||
Requires: git, MariaDB-server, MariaDB-client, MariaDB-compat, python-setuptools, nginx
|
||||
Requires: zlib-devel, bzip2-devel, openssl-devel, postfix, python27-devel, python27
|
||||
Requires: libxml2, libxml2-devel, libxslt, libxslt-devel, redis, MariaDB-devel, libXrender, libXext
|
||||
Requires: python27-setuptools, cronie, sudo, which, xorg-x11-fonts-Type1, xorg-x11-fonts-75dpi, nodejs, npm
|
||||
Requires: libtiff-devel, libjpeg-devel, libzip-devel, freetype-devel, lcms2-devel, libwebp-devel, tcl-devel, tk-devel
|
||||
%endif
|
||||
|
||||
# centos 7 dependencies
|
||||
%if 0%{rhel} == 7
|
||||
Requires: git, mariadb-server, mariadb-devel, python-setuptools, nginx
|
||||
Requires: zlib-devel, bzip2-devel, openssl-devel, postfix, python-devel
|
||||
Requires: libxml2, libxml2-devel, libxslt, libxslt-devel, redis, libXrender, libXext
|
||||
Requires: supervisor, cronie, sudo, which, xorg-x11-fonts-75dpi, xorg-x11-fonts-Type1, nodejs, npm
|
||||
Requires: libtiff-devel, libjpeg-devel, libzip-devel, freetype-devel, lcms2-devel, libwebp-devel, tcl-devel, tk-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
UNKNOWN
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
|
||||
python2.7 setup.py bdist_wheel
|
||||
|
||||
%install
|
||||
# directory for bench installation
|
||||
mkdir -p build
|
||||
# the following is to install bench locally
|
||||
export ppath=`pwd`/build
|
||||
export PYTHONPATH=$ppath
|
||||
export whl_file=`find . -type f -name *.whl`
|
||||
pip install --root=$ppath $whl_file --ignore-installed
|
||||
# pip installed bench, now moving it to appropriate location in %{buildroot}
|
||||
mkdir -p %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
cp -r build/usr/* %{buildroot}/usr/
|
||||
cp -r bench/ %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc MANIFEST.in LICENSE.md README.md
|
||||
/usr/bin/*
|
||||
/usr/lib/*
|
@ -14,12 +14,12 @@ License: GPL
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
BuildArch: noarch
|
||||
BuildArch: x86_64
|
||||
Vendor: Frappe Technologies <info@frappe.io>
|
||||
Url: https://github.com/frappe/bench
|
||||
|
||||
# for building/installing the package
|
||||
BuildRequires: python, python-wheel
|
||||
BuildRequires: python
|
||||
|
||||
# centos 6 dependencies
|
||||
%if 0%{rhel} == 6
|
||||
@ -53,10 +53,11 @@ mkdir -p build
|
||||
export ppath=`pwd`/build
|
||||
export PYTHONPATH=$ppath
|
||||
export whl_file=`find . -type f -name *.whl`
|
||||
pip install --root=$ppath $whl_file
|
||||
pip install --root=$ppath $whl_file --ignore-installed
|
||||
# pip installed bench, now moving it to appropriate location in %{buildroot}
|
||||
mkdir -p %{buildroot}/usr/bin
|
||||
cp build/usr/bin/bench %{buildroot}/usr/bin/
|
||||
mkdir -p %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
cp -r build/usr/* %{buildroot}/usr/
|
||||
cp -r bench/ %{buildroot}/usr/lib/python2.7/site-packages/
|
||||
|
||||
|
||||
%clean
|
||||
@ -65,4 +66,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc MANIFEST.in LICENSE.md README.md
|
||||
/usr/bin/bench
|
||||
/usr/bin/*
|
||||
/usr/lib/*
|
||||
/usr/lib64/*
|
Loading…
Reference in New Issue
Block a user