2021-11-08 Fred Gleason <fredg@paravelsystems.com>

* Added a 'python36-rivwebpyapi' package to the 'make rpm' target.
	* Split the 'make rpm' target into 'make base-rpm' and
	'make py-rpm' sub-targets.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-11-08 14:51:49 -05:00
parent a1d0d5e44c
commit 6423830af1
6 changed files with 80 additions and 5 deletions

2
.gitignore vendored
View File

@ -19,6 +19,7 @@
*.rlm
*.rpm
*.so
*.spec
*.xsl
*.tar.gz
*.tar.xz
@ -116,7 +117,6 @@ rdvairplayd/rdvairplayd
ripcd/ripcd
rivendell
rivendell-suse
rivendell.spec
slack-desc
systemd/rivendell.service
tests/audio_convert_test

View File

@ -22583,3 +22583,7 @@
API.
2021-11-08 Fred Gleason <fredg@paravelsystems.com>
* Changed the name of the 'RivWebPyApi' to 'rivwebpyapi'.
2021-11-08 Fred Gleason <fredg@paravelsystems.com>
* Added a 'python36-rivwebpyapi' package to the 'make rpm' target.
* Split the 'make rpm' target into 'make base-rpm' and
'make py-rpm' sub-targets.

View File

@ -71,7 +71,7 @@ maintainer-clean-local:
deb: dist
./build_debs.sh
rpm: dist
base-rpm: dist
mkdir -p $(HOME)/rpmbuild/SOURCES
cp rivendell-$(VERSION).tar.gz $(HOME)/rpmbuild/SOURCES/
$(RPMBUILD) -ba --target $(ARCH)-$(VENDOR)-linux rivendell.spec
@ -80,6 +80,28 @@ rpm: dist
mv $(HOME)/rpmbuild/SRPMS/rivendell-*.src.rpm $(top_srcdir)/
rm $(HOME)/rpmbuild/SOURCES/rivendell-$(VERSION).tar.gz
py-rpm: dist
mkdir -p $(HOME)/rpmbuild/SOURCES
cp rivendell-$(VERSION).tar.gz $(HOME)/rpmbuild/SOURCES/
$(RPMBUILD) -ba --target noarch-$(VENDOR)-linux rivwebpyapi.spec
mv $(HOME)/rpmbuild/RPMS/noarch/python36-rivwebpyapi-*.rpm $(top_srcdir)/
mv $(HOME)/rpmbuild/SRPMS/python36-rivwebpyapi-*.rpm $(top_srcdir)/
rm $(HOME)/rpmbuild/SOURCES/rivendell-$(VERSION).tar.gz
rpm: py-rpm base-rpm
#rpm: dist
# mkdir -p $(HOME)/rpmbuild/SOURCES
# cp rivendell-$(VERSION).tar.gz $(HOME)/rpmbuild/SOURCES/
# $(RPMBUILD) -ba --target $(ARCH)-$(VENDOR)-linux rivendell.spec
# $(RPMBUILD) -ba --target noarch-$(VENDOR)-linux rivwebpyapi.spec
# mv $(HOME)/rpmbuild/RPMS/$(ARCH)/rivendell-*.rpm $(top_srcdir)/
# mv $(HOME)/rpmbuild/RPMS/noarch/rivendell-*.rpm $(top_srcdir)/
# mv $(HOME)/rpmbuild/SRPMS/rivendell-*.src.rpm $(top_srcdir)/
# mv $(HOME)/rpmbuild/RPMS/noarch/python36-rivwebpyapi-*.rpm $(top_srcdir)/
# mv $(HOME)/rpmbuild/SRPMS/python36-rivwebpyapi-*.rpm $(top_srcdir)/
# rm $(HOME)/rpmbuild/SOURCES/rivendell-$(VERSION).tar.gz
zip: dist
tar -zxf rivendell-@VERSION@.tar.gz
zip -r rivendell-@VERSION@.zip rivendell-@VERSION@
@ -94,6 +116,7 @@ EXTRA_DIST = autogen.sh\
rivendell.ism\
rivendell.pro\
rivendell.spec.in\
rivwebpyapi.spec.in\
UPGRADING
CLEANFILES = *~\
@ -110,11 +133,11 @@ CLEANFILES = *~\
*.zip\
py-compile
DISTCLEANFILES = config.guess\
DISTCLEANFILES = *.spec\
config.guess\
config.sub\
ltmain.sh\
rivendell\
rivendell.spec
rivendell
MAINTAINERCLEANFILES = *~\
*.tar.gz\

View File

@ -593,6 +593,7 @@ ln -s ../../icons/redx.png docs/opsguide/redx.png
AC_CONFIG_FILES([rivendell.spec \
rivwebpyapi.spec \
debian/Makefile \
debian/source/Makefile \
Makefile \

View File

@ -177,6 +177,8 @@ cp scripts/init_template_host.py $RPM_BUILD_ROOT/@DOC_PATH@
rm -f $RPM_BUILD_ROOT/etc/auto.rd.audiostore
rm -rf $RPM_BUILD_ROOT%{_libdir}/rivendell/pypad/__pycache__
rm -rf $RPM_BUILD_ROOT%{_libdir}/python3.6/site-packages/__pycache__
find $RPM_BUILD_ROOT/usr/lib64/python3.6/site-packages -name \*rivwebpyapi\* -exec rm \{\} \;
%post
/sbin/ldconfig

45
rivwebpyapi.spec.in Normal file
View File

@ -0,0 +1,45 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
# Turn off brp-python-bytecompile automagic
# See https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation
%global _python_bytecompile_extra 0
Name: python36-rivwebpyapi
Version: @VERSION@
Release: 1%{?dist}
Summary: Python 3.6 interface for accessing the Rivendell Web API
Group: Development/Languages
License: LGPLv2
URL: https://github.com/ElvishArtisan/rivendell
Source: rivendell-%{version}.tar.gz
BuildRequires: python36-devel
%description
This is a Python 3 language binding for the Rivendell Web API.
%prep
%setup -q -n rivendell-%{version}
%build
export PYTHON=/usr/bin/python3.6
%configure --libexecdir=@libexecdir@ --sysconfdir=@sysconfdir@ @RDXPORTDEBUG@
%install
make -C apis/rivwebpyapi install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/doc/%{name}-%{version}/examples
cp apis/rivwebpyapi/tests/*.py $RPM_BUILD_ROOT/%{_datadir}/doc/%{name}-%{version}/examples/
%files
/usr/lib64/python3.6/site-packages/rivwebpyapi.py
/usr/lib64/python3.6/site-packages/__pycache__/*
%{_datadir}/doc/%{name}-%{version}
%changelog
* Mon Nov 8 2021 Fred Gleason <fredg@paravelsystems.com>
- Initial RPM package