Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:radiorabe:airtime
libretime
libretime.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libretime.spec of Package libretime
# # spec file for LibreTime # # Copyright (c) 2017 LibreTime Community # http://libretime.org # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public # License as published by the Free Software Foundation, version # 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public # License along with this program. # If not, see <http://www.gnu.org/licenses/>. # # Please submit enhancements, bugfixes or comments via GitHub: # https://github.com/LibreTime/libretime # %define _version 3.0.0-alpha.8 %define _rpm_version %(echo "%{_version}" | sed 's/-/./') %define legacy_name airtime Name: libretime Version: %{_rpm_version} Release: 0%{?dist} Summary: LibreTime Radio Automation Suite License: AGPLv3 URL: http://libretime.org Source0: https://github.com/LibreTime/libretime/releases/download/%{_version}/%{name}-%{_version}.tar.gz Source1: libretime.repo Patch0: https://github.com/LibreTime/libretime/compare/master...radiorabe:feature/liquidsoap-1.3-for-3.0.0-alpha.7.patch Patch1: disable-liquidsoap-logs.patch Patch2: python-275-compat.patch BuildArch: noarch BuildRequires: python-setuptools BuildRequires: pytz BuildRequires: python-boto BuildRequires: python-nose BuildRequires: python-mutagen BuildRequires: python-amqp %if 0%{?rhel} BuildRequires: python-amqplib %endif BuildRequires: python-six BuildRequires: python-configobj BuildRequires: python-inotify BuildRequires: python-pydispatcher BuildRequires: python-poster BuildRequires: python-kombu BuildRequires: python-docopt BuildRequires: python-mutagen BuildRequires: python2-vine BuildRequires: python-requests BuildRequires: systemd # add all subpackages to base package for all-in-one installs Requires: %{name}-web Requires: %{name}-utils Requires: %{name}-analyzer Requires: %{name}-api_clients Requires: %{name}-pypo Requires: %{name}-icecast Requires: %{name}-celery %description LibreTime makes it easy to run your own online or terrestrial radio station. It is a community managed fork of the AirTime project. It is managed by a friendly inclusive community of stations from around the globe that use, document and improve LibreTime. %prep %setup -q -n %{name}-%{_version} %patch -P 0 -p 1 %patch -P 1 -p 1 %patch -P 2 -p 1 %build %install # Install system directories install -d %{buildroot}/%{_sysconfdir}/%{legacy_name} install -d %{buildroot}/%{_unitdir} install -d %{buildroot}/%{_sysconfdir}/yum.repos.d # install libretime-release parts install %{SOURCE1} %{buildroot}/%{_sysconfdir}/yum.repos.d # isntall all the systemd units from centos-rpm repo install installer/systemd/*.service %{buildroot}/%{_unitdir} # hacky patch for wrong users in service files sed -i \ -e 's/User=.*/User=%{name}-pypo/' \ -e 's/Group=.*/Group=%{name}-pypo/' \ %{buildroot}/%{_unitdir}/airtime-liquidsoap.service sed -i \ -e 's/User=.*/User=%{name}-analyzer/' \ -e 's/Group=.*/Group=%{name}-analyzer/' \ %{buildroot}/%{_unitdir}/airtime_analyzer.service sed -i \ -e 's/User=.*/User=%{name}-celery/' \ -e 's/Group=.*/Group=%{name}-celery/' \ -e 's|ExecStart=/usr/local/|ExecStart=/|' \ %{buildroot}/%{_unitdir}/airtime-celery.service # install airtime-web parts in the right location for the httpd package mkdir -p %{buildroot}/var/www/%{name}/%{legacy_name}_mvc cp -rp %{legacy_name}_mvc/{application,build,locale,public} %{buildroot}/var/www/%{name}/%{legacy_name}_mvc/ cp -rp vendor %{buildroot}/var/www/%{name} install VERSION %{buildroot}/var/www/%{name}/VERSION # configure zend config dep into scl php install -d %{buildroot}/etc/php.d cat << EOF > %{buildroot}/etc/php.d/50-upload_tmp_dir.ini [main] upload_tmp_dir=/tmp EOF cat << EOF > %{buildroot}/etc/php.d/50-upload_max_filesize.ini upload_max_filesize=20M post_max_size=20M EOF # setup apache install -d %{buildroot}/etc/httpd/conf.d cat << EOF > %{buildroot}/etc/httpd/conf.d/%{name}-fallback.conf <Directory "/var/www/%{name}/%{legacy_name}_mvc/public/"> FallbackResource /index.php </Directory> EOF # install airtime-utils so they can be called by a user mkdir -p %{buildroot}/usr/{sbin,bin} pushd utils cp airtime-backup.py \ airtime-log \ airtime-log.php \ airtime-import/airtime-import \ %{buildroot}/usr/sbin/ cp airtime-test-soundcard \ airtime-test-soundcard.py \ airtime-test-stream \ airtime-test-stream.py \ $RPM_BUILD_ROOT/usr/bin/ popd export PYTHONPATH=%{buildroot}/${_prefix}usr/lib64/python2.7/site-packages mkdir -p $PYTHONPATH # install analyzer python app pushd python_apps/airtime_analyzer python setup.py build --no-init-script python setup.py install --no-init-script --prefix=%{buildroot}/${_prefix}usr --install-lib=$PYTHONPATH --single-version-externally-managed --record=installed.pth mkdir -p %{buildroot}/%{_sysconfdir}/%{legacy_name} popd install -d %{buildroot}/%{_tmppath}/airtime/airtime_analyzer # install api_clients module pushd python_apps/api_clients/ python setup.py build python setup.py install --prefix=%{buildroot}/${_prefix}usr --install-lib=$PYTHONPATH --single-version-externally-managed --record=installed.pth popd # install celery module pushd python_apps/airtime-celery/ python setup.py build --no-init-script python setup.py install --no-init-script --prefix=%{buildroot}/${_prefix}usr --install-lib=$PYTHONPATH --single-version-externally-managed --record=installed.pth popd # install pypo module pushd python_apps/pypo/ python setup.py build --no-init-script python setup.py install --no-init-script --prefix=%{buildroot}/${_prefix}usr --install-lib=$PYTHONPATH --single-version-externally-managed --record=installed.pth popd # install icecast xsl pushd python_apps/icecast2 mkdir -p %{buildroot}/${_prefix}usr/share/icecast/web cp airtime-icecast-status.xsl %{buildroot}/${_prefix}usr/share/icecast/web/airtime-icecast-status.xsl popd %files %defattr(-,root,root,-) %doc README.md CREDITS LICENSE LICENSE_3RD_PARTY # add conf and tmp so they are not grabbed by a later package %dir %{_sysconfdir}/%{legacy_name} %dir %{_tmppath}/%{legacy_name} # Web Subpackage %package web Summary: LibreTime Web Interface and API Provides: %{legacy_name}-web Requires: php Requires: php-pdo Requires: php-gd Requires: php-pgsql Requires: php-bcmath Requires: php-mbstring Requires: php-xml Requires: httpd Requires: liquidsoap %description web The main LibreTime web and API interface in /var/www. %files web %config(noreplace) /var/www/%{name}/%{legacy_name}_mvc/application/configs/application.ini %config(noreplace) /etc/php.d/*.ini %config(noreplace) /etc/httpd/conf.d/%{name}-fallback.conf /var/www/%{name}/VERSION /var/www/%{name}/%{legacy_name}_mvc /var/www/%{name}/vendor # Utils Subpackage %package utils Summary: LibreTime Utility Scripts Provides: %{legacy_name}-utils %description utils Various small commandline utils for use with LibreTime. %files utils /usr/sbin/airtime-backup.py /usr/sbin/airtime-log /usr/sbin/airtime-log.php /usr/sbin/airtime-import /usr/bin/airtime-test-* # Analyzer Subpackage %package analyzer Summary: LibreTime Media Analyzer component AutoReqProv: no Requires: liquidsoap Requires: python Requires: pytz Requires: python-mutagen Requires: python-amqp Requires: python-amqplib Requires: python-six Requires: python-configobj Requires: python-inotify Requires: python-pydispatcher Requires: python-poster Requires: python-kombu Requires: python-docopt Requires: python-vine Requires: python-daemon Requires: python-magic Requires: python-pika Requires: python-requests Requires: python-libcloud Requires: python-rgain Requires: python-boto Requires: %{name}-api_clients Requires: lsof Requires: silan %{?systemd_requires} %description analyzer LibreTime analyzer imports uploaded files. %pre analyzer getent group %{name} >/dev/null || groupadd -r %{name} getent group %{name}-analyzer >/dev/null || groupadd -r %{name}-analyzer getent passwd %{name}-analyzer >/dev/null || \ useradd -r -g %{name}-analyzer -G %{name} -d /var/tmp/airtime/analyzer -m \ -c "LibreTime media analyzer" %{name}-analyzer exit 0 %post analyzer %systemd_post airtime_analyzer.service %preun analyzer %systemd_preun airtime_analyzer.service %postun analyzer %systemd_postun airtime_analyzer.service %files analyzer %dir %attr(-, %{name}-analyzer, %{name}-analyzer) %{_tmppath}/airtime/airtime_analyzer %attr(550, -, -) %{_unitdir}/airtime_analyzer.service %{_bindir}/airtime_analyzer %{_libdir}/python2.7/site-packages/airtime_analyzer* # API Clients Subpackage %package api_clients Summary: LibreTime Python API Clients AutoReqProv: no Provides: %{legacy_name}-api_clients Requires: python %description api_clients Python api_clients module for LibreTime. %files api_clients /usr/lib64/python2.7/site-packages/api_clients* # Python Playout Subpackage %package pypo Summary: LibreTime Playout AutoReqProv: no Provides: %{legacy_name}-pypo Requires: python Requires: python-requests Requires: liquidsoap Requires: python-setuptools Requires: pytz Requires: python-inotify Requires: python2-pydispatcher Requires: python-poster Requires: python-mutagen Requires: python-kombu Requires: python-amqplib Requires: python-vine Requires: python2-defusedxml Requires: python-configobj Requires: %{name}-api_clients %{?systemd_requires} %description pypo Python Play-Out for LibreTime interfaces with the API and runs Liquidsoap. %pre pypo getent group %{name} >/dev/null || groupadd -r %{name} getent group %{name}-pypo >/dev/null || groupadd -r %{name}-pypo getent passwd %{name}-pypo >/dev/null || \ useradd -r -g %{name}-pypo -G %{name} -d /dev/null \ -c "LibreTime pypo playout server" %{name}-pypo exit 0 %post pypo %systemd_post airtime-playout.service %systemd_post airtime-liquidsoap.service %preun pypo %systemd_preun airtime-playout.service %systemd_preun airtime-liquidsoap.service %postun pypo %systemd_postun airtime-playout.service %systemd_postun airtime-liquidsoap.service %files pypo %attr(550, -, -) %{_unitdir}/airtime-playout.service %attr(550, -, -) %{_unitdir}/airtime-liquidsoap.service %{_libdir}/python2.7/site-packages/airtime_playout* %{_libdir}/python2.7/site-packages/pypo/ %{_libdir}/python2.7/site-packages/liquidsoap/ %{_bindir}/airtime-liquidsoap %{_bindir}/airtime-playout %{_bindir}/pyponotify # Icecast Configuration Subpackage %package icecast Summary: LibreTime icecast XST configuration AutoReqProv: no Provides: %{legacy_name}-icecast Requires: icecast %description icecast Install LibreTime icecast XML snippet into icecast webdir. %files icecast %{_datarootdir}/icecast/web/airtime-icecast-status.xsl # Celery Subpackage %package celery Summary: LibreTime Celery Tasks AutoReqProv: no Provides: %{legacy_name}-celery Requires: python-celery Requires: python-soundcloud Requires: python-setuptools Requires: python-requests Requires: python-mutagen Requires: python-configobj %{?systemd_requires} %description celery LibreTime Celery Tasks. %pre celery getent group %{name} >/dev/null || groupadd -r %{name} getent group %{name}-celery >/dev/null || groupadd -r %{name}-celery getent passwd %{name}-celery >/dev/null || \ useradd -r -g %{name}-celery -G %{name} -d /dev/null \ -c "LibreTime celery user" %{name}-celery exit 0 %post celery %systemd_post airtime-celery.service %preun celery %systemd_preun airtime-celery.service %postun celery %systemd_postun airtime-celery.service %files celery %attr(550, -, -) %{_unitdir}/airtime-celery.service %{_libdir}/python2.7/site-packages/airtime_celery* %{_libdir}/python2.7/site-packages/airtime-celery* # Release Subpackage %package release Summary: LibreTime Release Package AutoReqProv: no %description release LibreTime Release Package. %files release %defattr(550, root, root) %config(noreplace) %{_sysconfdir}/yum.repos.d/%{name}.repo
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor