-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd93a6d
commit a545658
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Contributor: Juergen Mang <[email protected]> | ||
# Maintainer: Juergen Mang <[email protected]> | ||
pkgname=myMPD | ||
pkgver=5.5.1 | ||
pkgrel=0 | ||
pkgdesc="myMPD is a standalone and mobile friendly web mpdclient" | ||
url="https://github.com/jcorporation/myMPD" | ||
arch="all" | ||
license="GPL-2.0-or-later" | ||
depends="libmpdclient libmediainfo openssl" | ||
makedepends="cmake libmpdclient-dev libmediainfo-dev openssl-dev linux-headers" | ||
install="$pkgname.pre-install $pkgname.post-install" | ||
source=" | ||
https://github.com/jcorporation/myMPD/archive/v5.5.1.zip | ||
myMPD.initd | ||
" | ||
builddir="$srcdir/$pkgname-$pkgver" | ||
options="!check" | ||
#no test suite | ||
|
||
build() { | ||
cd "$builddir" | ||
mkdir release | ||
cd release | ||
if [ "$CBUILD" != "$CHOST" ]; then | ||
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" | ||
fi | ||
cmake \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-DCMAKE_INSTALL_LIBDIR=lib \ | ||
-DBUILD_SHARED_LIBS=True \ | ||
-DCMAKE_BUILD_TYPE=RELEASE \ | ||
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \ | ||
-DCMAKE_C_FLAGS="$CFLAGS" \ | ||
${CMAKE_CROSSOPTS} .. | ||
make | ||
} | ||
|
||
package() { | ||
cd "$builddir/release" | ||
make DESTDIR="$pkgdir" install | ||
|
||
install -m755 -D "$srcdir"/$pkgname.initd \ | ||
"$pkgdir"/etc/init.d/$pkgname | ||
chown -R mympd.mympd "$pkgdir"/var/lib/mympd | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/sbin/openrc-run | ||
|
||
# myMPD init.d file for alpine linux. | ||
|
||
name=mympd | ||
command="/usr/bin/$name" | ||
command_args="" | ||
command_background="yes" | ||
|
||
start_stop_daemon_args="" | ||
pidfile="/run/$name.pid" | ||
|
||
depend() { | ||
need net | ||
after firewall | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
ETCDIR="/etc/mympd" | ||
SHAREDIR="/usr/share/mympd" | ||
VARDIR="/var/lib/mympd" | ||
|
||
# move smartpls into place unless already existing | ||
for PLDIST in "${VARDIR}"/smartpls/*.dist | ||
do | ||
if [ -f "$PLDIST" ] | ||
then | ||
PLS=$(basename "$PLDIST" .dist) | ||
if [ -f "${VARDIR}/smartpls/$PLS" ] | ||
then | ||
rm "$PLDIST" | ||
else | ||
mv -v "$PLDIST" "${VARDIR}/smartpls/$PLS" | ||
fi | ||
fi | ||
done | ||
|
||
# move config into place unless already existing | ||
if [ ! -f "${ETCDIR}/mympd.conf" ] | ||
then | ||
mv "${ETCDIR}/mympd.conf.dist" "${ETCDIR}/mympd.conf" | ||
else | ||
echo "mympd.conf installed as mympd.conf.dist" | ||
fi | ||
|
||
if [ -d "${VARDIR}/ssl" ] | ||
then | ||
echo "Certificates already created" | ||
else | ||
echo "Creating certificates" | ||
"${SHAREDIR}/crcert.sh" "${VARDIR}/ssl" | ||
fi | ||
|
||
echo "myMPD installed" | ||
echo "Edit ${ETCDIR}/mympd.conf before starting myMPD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
addgroup -S mympd 2>/dev/null | ||
adduser -S -D -H -s /bin/flase -G mympd -g mympd mympd 2>/dev/null | ||
|
||
exit 0 |