mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 14:43:30 +02:00
2021-05-19 Fred Gleason <fredg@paravelsystems.com>
* Hacked the build system to make the PyPAD module install correctly on Debian-ish systems. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
70d773d78e
commit
cb4f8fe9ea
@ -21715,3 +21715,6 @@
|
|||||||
2021-05-19 Fred Gleason <fredg@paravelsystems.com>
|
2021-05-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Removed the 'LOCAL_PREFIX' and 'RD_LIB_PATH' Autoconf
|
* Removed the 'LOCAL_PREFIX' and 'RD_LIB_PATH' Autoconf
|
||||||
substitutions from the build system.
|
substitutions from the build system.
|
||||||
|
2021-05-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Hacked the build system to make the PyPAD module install
|
||||||
|
correctly on Debian-ish systems.
|
||||||
|
@ -45,6 +45,9 @@ AC_DEFUN([AR_GCC_TARGET],[AC_REQUIRE([AC_PROG_CC])]
|
|||||||
# $ar_distro_version = Distribution Version (10.3, 3.1, etc)
|
# $ar_distro_version = Distribution Version (10.3, 3.1, etc)
|
||||||
# $ar_distro_major = Distribution Version Major Number (10, 3, etc)
|
# $ar_distro_major = Distribution Version Major Number (10, 3, etc)
|
||||||
# $ar_distro_minor = Distribution Version Minor Number (3, 1, etc)
|
# $ar_distro_minor = Distribution Version Minor Number (3, 1, etc)
|
||||||
|
# $ar_distro_pretty_name = Full Distribution Name (Ubuntu 20.04.2 LTS, etc)
|
||||||
|
# $ar_distro_id = All lowercase identifier (ubuntu, debian, centos, etc)
|
||||||
|
# $ar_distro_id_like = Identifier(s) of similar distros (rhel fedora, etc)
|
||||||
#
|
#
|
||||||
AC_DEFUN([AR_GET_DISTRO],[]
|
AC_DEFUN([AR_GET_DISTRO],[]
|
||||||
[
|
[
|
||||||
@ -53,7 +56,10 @@ AC_DEFUN([AR_GET_DISTRO],[]
|
|||||||
ar_distro_version=$(./get_distro.pl VERSION)
|
ar_distro_version=$(./get_distro.pl VERSION)
|
||||||
ar_distro_major=$(./get_distro.pl MAJOR)
|
ar_distro_major=$(./get_distro.pl MAJOR)
|
||||||
ar_distro_minor=$(./get_distro.pl MINOR)
|
ar_distro_minor=$(./get_distro.pl MINOR)
|
||||||
AC_MSG_RESULT([$ar_distro_name $ar_distro_version])
|
ar_distro_pretty_name=$(./get_distro.pl PRETTY_NAME)
|
||||||
|
ar_distro_id=$(./get_distro.pl ID)
|
||||||
|
ar_distro_id_like=$(./get_distro.pl ID_LIKE)
|
||||||
|
AC_MSG_RESULT([$ar_distro_pretty_name $ar_distro_version])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
25
configure.ac
25
configure.ac
@ -162,6 +162,12 @@ else
|
|||||||
AC_SUBST(QT_MYSQL_PKG,"qt5-qtbase-mysql")
|
AC_SUBST(QT_MYSQL_PKG,"qt5-qtbase-mysql")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if test $ar_distro_id = "debian" ; then
|
||||||
|
DISTRO_IS_DEBIANISH=yes
|
||||||
|
fi
|
||||||
|
if test $ar_distro_id = "ubuntu" ; then
|
||||||
|
DISTRO_IS_DEBIANISH=yes
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for Expat
|
# Check for Expat
|
||||||
@ -245,9 +251,22 @@ AC_CHECK_HEADER(soundtouch/SoundTouch.h,[],[AC_MSG_ERROR([*** SoundTouch not fou
|
|||||||
#
|
#
|
||||||
# Check for Python
|
# Check for Python
|
||||||
#
|
#
|
||||||
AM_PATH_PYTHON([3])
|
if test -z $DISTRO_IS_DEBIANISH ; then
|
||||||
#echo -n $pythondir | sed "s^\${prefix}^/usr^" > debian/pythondir
|
AM_PATH_PYTHON([3])
|
||||||
AC_SUBST(PYTHON_BASE_DEP,"python"`echo $PYTHON_VERSION | sed -e s/3./3/`)
|
#echo -n $pythondir | sed "s^\${prefix}^/usr^" > debian/pythondir
|
||||||
|
AC_SUBST(PYTHON_BASE_DEP,"python"`echo $PYTHON_VERSION | sed -e s/3./3/`)
|
||||||
|
else
|
||||||
|
#
|
||||||
|
# FIXME: Horrible hack to make Python install correctly on Debianish setups
|
||||||
|
#
|
||||||
|
AC_MSG_NOTICE([Configuring Debian-style Python installation])
|
||||||
|
PYTHON="/usr/bin/python3"
|
||||||
|
AC_ARG_VAR(PYTHON,[the Python interpreter])
|
||||||
|
pythondir="/usr/lib/python3/dist-packages"
|
||||||
|
AC_ARG_VAR(pythondir,[the Python modules directory])
|
||||||
|
pyexecdir="/usr/lib/python3/dist-packages"
|
||||||
|
AC_ARG_VAR(pyexecdir,[the Python extension modules directory])
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for FLAC
|
# Check for FLAC
|
||||||
|
9
debian/rules
vendored
9
debian/rules
vendored
@ -100,11 +100,10 @@ binary:
|
|||||||
# rivendell-pypad
|
# rivendell-pypad
|
||||||
#
|
#
|
||||||
mkdir -p debian/rivendell-pypad/usr/lib/rivendell/pypad
|
mkdir -p debian/rivendell-pypad/usr/lib/rivendell/pypad
|
||||||
cp -a apis/pypad/scripts/pypad* debian/rivendell-pypad/usr/lib/rivendell/pypad/
|
mv debian/tmp/usr/lib/rivendell/pypad/* debian/rivendell-pypad/usr/lib/rivendell/pypad/
|
||||||
mkdir -p debian/rivendell-pypad/usr/lib/python3.8/pypad
|
mkdir -p debian/rivendell-pypad/usr/lib/python3/dist-packages/__pycache__
|
||||||
mv debian/tmp/usr/lib/python3.8/site-packages/pypad.py debian/rivendell-pypad/usr/lib/python3.8/pypad/
|
mv debian/tmp/usr/lib/python3/dist-packages/pypad.py debian/rivendell-pypad/usr/lib/python3/dist-packages/
|
||||||
mv debian/tmp/usr/lib/python3.8/site-packages/__pycache__ debian/rivendell-pypad/usr/lib/python3.8/pypad/
|
mv debian/tmp/usr/lib/python3/dist-packages/__pycache__/* debian/rivendell-pypad/usr/lib/python3/dist-packages/__pycache__/
|
||||||
rmdir debian/tmp/usr/lib/python3.8/site-packages
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# rivendell-select
|
# rivendell-select
|
||||||
|
@ -2,10 +2,13 @@
|
|||||||
|
|
||||||
# get_distro.pl
|
# get_distro.pl
|
||||||
#
|
#
|
||||||
# Try to determine the distribution name and version of the host machine.
|
# Read various fields from 'os-release'.
|
||||||
# Used as part of the AR_GET_DISTRO() macro.
|
# Used as part of the AR_GET_DISTRO() macro.
|
||||||
#
|
#
|
||||||
# (C) Copyright 2012,2016 Fred Gleason <fredg@salemradiolabs.com>
|
# See https://www.freedesktop.org/software/systemd/man/os-release.html
|
||||||
|
# for a description of the various fields.
|
||||||
|
#
|
||||||
|
# (C) Copyright 2012-2021 Fred Gleason <fredg@salemradiolabs.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as
|
# it under the terms of the GNU General Public License as
|
||||||
@ -22,13 +25,28 @@
|
|||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
#USAGE: get_distro.pl NAME|VERSION|MAJOR|MINOR|POINT
|
my $usage="USAGE: get_distro.pl NAME|PRETTY_NAME|ID|ID_LIKE|VERSION|MAJOR|MINOR|POINT";
|
||||||
|
|
||||||
if($ARGV[0] eq "NAME") {
|
if($ARGV[0] eq "NAME") {
|
||||||
print &Extract("NAME");
|
print &Extract("NAME");
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($ARGV[0] eq "PRETTY_NAME") {
|
||||||
|
print &Extract("PRETTY_NAME");
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ARGV[0] eq "ID") {
|
||||||
|
print &Extract("ID");
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ARGV[0] eq "ID_LIKE") {
|
||||||
|
print &Extract("ID_LIKE");
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
|
||||||
if($ARGV[0] eq "VERSION") {
|
if($ARGV[0] eq "VERSION") {
|
||||||
print &Extract("VERSION_ID");
|
print &Extract("VERSION_ID");
|
||||||
exit 0;
|
exit 0;
|
||||||
@ -63,18 +81,22 @@ if($ARGV[0] eq "POINT") {
|
|||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print $usage;
|
||||||
exit 256;
|
exit 256;
|
||||||
|
|
||||||
|
|
||||||
sub Extract
|
sub Extract
|
||||||
{
|
{
|
||||||
if(open RELEASE,"<","/etc/os-release") {
|
if((open RELEASE,"<","/etc/os-release") ||
|
||||||
|
(open RELEASE,"<","/usr/lib/os-release")) {
|
||||||
while(<RELEASE>) {
|
while(<RELEASE>) {
|
||||||
my @f0=split "\n",$_;
|
my @f0=split "\n",$_;
|
||||||
for(my $i=0;$i<@f0;$i++) {
|
for(my $i=0;$i<@f0;$i++) {
|
||||||
my @f1=split "=",$f0[$i];
|
my @f1=split "=",$f0[$i];
|
||||||
if($f1[0] eq $_[0]) {
|
if($f1[0] eq $_[0]) {
|
||||||
return substr($f1[1],1,length($f1[1])-2);
|
$f1[1]=~s/^"(.*)"$/$1/;
|
||||||
|
return $f1[1];
|
||||||
|
# return substr($f1[1],1,length($f1[1])-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user