summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Gorodinsky2019-04-16 12:04:22 +0300
committerEugene Gorodinsky2019-04-16 12:20:28 +0300
commit61621bcb244254eaec0a077f5d93ab6e28b0dda6 (patch)
treedb518c1b4b1d2df1f00980c913dc5f14a42ad598
downloadaur-61621bcb244254eaec0a077f5d93ab6e28b0dda6.tar.gz
Initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD167
-rw-r--r--meson.patch13
-rw-r--r--mpd.conf10
-rw-r--r--mpd.install11
-rw-r--r--mpd.tmpfile1
6 files changed, 229 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..03cb3948368
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = mpd-lightest
+ pkgdesc = "Lightest" mpd version with everything disabled. Modify PKGBUILD and enable the features and flags you need
+ pkgver = 0.21.7
+ pkgrel = 1
+ url = https://www.musicpd.org/
+ install = mpd.install
+ arch = i686
+ arch = x86_64
+ arch = armv6h
+ arch = armv7h
+ license = GPL
+ makedepends = boost
+ makedepends = meson
+ makedepends = python-sphinx
+ provides = mpd=0.21.7
+ conflicts = mpd
+ replaces = mpd
+ backup = etc/mpd.conf
+ source = https://www.musicpd.org/download/mpd/0.21/mpd-0.21.7.tar.xz
+ source = mpd.tmpfile
+ source = mpd.conf
+ sha256sums = 512062bc529bee04d4ccfaa2c6e720afc85bb071e49850a096b5ed518b3b412c
+ sha256sums = c1683ba35774c85e16c70e89f7e2ed1c09619512b1a273daabbd5e34d40439bd
+ sha256sums = e213c108cd0e076b5cc07091707ef75d74d9ac8c779d0c0128cd0aa69617f8a0
+
+pkgname = mpd-lightest
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7287252ea82
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,167 @@
+# Maintainer: Eugene Gorodinsky <e.gorodinsky@gmail.com>
+# Contributor: Alexey D. <lq07829icatm@rambler.ru>
+# Contributor: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Angel Velasquez <angvp@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
+# Contributor: Ben <ben@benmazer.net>
+
+pkgname=mpd-lightest
+pkgver=0.21.7
+_majorver=0.21
+pkgrel=1
+pkgdesc='"Lightest" mpd version with everything disabled. Modify PKGBUILD and enable the features and flags you need'
+url='https://www.musicpd.org/'
+license=('GPL')
+arch=('i686' 'x86_64' 'armv6h' 'armv7h')
+depends=()
+makedepends=('boost' 'meson' 'python-sphinx')
+provides=("mpd=$pkgver")
+conflicts=('mpd')
+replaces=('mpd')
+source=("https://www.musicpd.org/download/mpd/${_majorver}/mpd-${pkgver}.tar.xz"
+ 'mpd.tmpfile'
+ 'mpd.conf')
+sha256sums=('512062bc529bee04d4ccfaa2c6e720afc85bb071e49850a096b5ed518b3b412c'
+ 'c1683ba35774c85e16c70e89f7e2ed1c09619512b1a273daabbd5e34d40439bd'
+ 'e213c108cd0e076b5cc07091707ef75d74d9ac8c779d0c0128cd0aa69617f8a0')
+backup=('etc/mpd.conf')
+install=mpd.install
+
+prepare() {
+ cd "${srcdir}/mpd-${pkgver}"
+ patch --input="${srcdir}/../meson.patch"
+
+ install -d build
+}
+
+build() {
+ cd "${srcdir}/mpd-${pkgver}/build"
+ _opts=('-Ddocumentation=true'
+
+ # networking
+ '-Dtcp=false'
+ '-Dlocal_socket=false'
+ '-Dipv6=disabled'
+
+ # audio formats
+ '-Ddsd=false'
+
+ # database
+ '-Dupnp=disabled'
+ '-Ddatabase=false'
+ '-Dlibmpdclient=disabled'
+
+ # neighbor
+ '-Dneighbor=false'
+
+ # storage
+ '-Dudisks=disabled'
+ '-Dwebdav=disabled'
+
+ # playlist
+ '-Dcue=false'
+
+ # input
+ '-Dsmbclient=disabled'
+ '-Dnfs=disabled'
+ '-Dcdio_paranoia=disabled'
+ '-Dcurl=disabled'
+ '-Dmms=disabled'
+
+ # cloud
+ '-Dqobuz=disabled'
+ '-Dtidal=disabled'
+ '-Dsoundcloud=disabled'
+
+ # archive
+ '-Dzzip=disabled'
+ '-Dbzip2=disabled'
+ '-Diso9660=disabled'
+
+ # tags
+ '-Dchromaprint=disabled' # appears not to be used for anything
+ '-Did3tag=disabled'
+
+ # decoders
+ '-Dadplug=disabled' # not in an official repo
+ '-Dmodplug=disabled'
+ '-Dsidplay=disabled' # unclear why but disabled in the past
+ '-Dwavpack=disabled'
+ '-Dffmpeg=disabled'
+ '-Daudiofile=disabled'
+ '-Dfaad=disabled'
+ '-Dflac=disabled'
+ '-Dfluidsynth=disabled'
+ '-Dgme=disabled'
+ '-Dmad=disabled'
+ '-Dmikmod=disabled'
+ '-Dmpcdec=disabled'
+ '-Dmpg123=disabled'
+ '-Dopus=disabled'
+ '-Dsndfile=disabled'
+ '-Dtremor=disabled'
+ '-Dvorbis=disabled'
+ '-Dwildmidi=disabled'
+
+ # encoders
+ '-Dwave_encoder=false'
+ '-Dvorbisenc=disabled'
+ '-Dlame=disabled'
+ '-Dtwolame=disabled'
+ '-Dshine=disabled' # not in an official repo
+
+ # filters
+ '-Dlibsamplerate=disabled'
+ '-Dsoxr=disabled'
+
+ # output
+ '-Dfifo=false'
+ '-Dhttpd=false'
+ '-Drecorder=false'
+ '-Doss=disabled'
+ '-Dalsa=disabled'
+ '-Dopenal=disabled'
+ '-Dpulse=disabled'
+ '-Dshout=disabled'
+ '-Dao=disabled'
+ '-Djack=disabled'
+ '-Dpipe=false'
+ '-Dsndio=disabled' # interferes with detection of alsa devices
+
+ # misc
+ '-Dyajl=disabled'
+ '-Ddbus=disabled'
+ '-Dsqlite=disabled'
+ '-Dexpat=disabled'
+ '-Dicu=disabled'
+ '-Diconv=disabled'
+ '-Dpcre=disabled'
+ '-Dzlib=disabled'
+
+ '-Dzeroconf=disabled'
+ )
+ arch-meson --auto-features auto .. ${_opts[@]}
+ ninja
+}
+
+package() {
+ cd "${srcdir}/mpd-${pkgver}/build"
+
+ DESTDIR="${pkgdir}" ninja install
+ install -Dm644 ../doc/mpdconf.example "${pkgdir}"/usr/share/doc/mpd/mpdconf.example
+ install -Dm644 ../doc/mpd.conf.5 "${pkgdir}"/usr/share/man/man5/mpd.conf.5
+ install -Dm644 ../doc/mpd.1 "${pkgdir}"/usr/share/man/man1/mpd.1
+
+ install -Dm644 "${srcdir}"/mpd.conf "${pkgdir}"/etc/mpd.conf
+ install -Dm644 "${srcdir}"/mpd.tmpfile "${pkgdir}"/usr/lib/tmpfiles.d/mpd.conf
+ install -d -g 45 -o 45 "${pkgdir}"/var/lib/mpd{,/playlists}
+
+ # Now service file installs only when libsystemd package was found
+ if [ -e "${pkgdir}"/usr/lib/systemd/system/mpd.service ]; then
+ sed \
+ -e '/\[Service\]/a User=mpd' \
+ -e '/WantedBy=/c WantedBy=default.target' \
+ -i "${pkgdir}"/usr/lib/systemd/system/mpd.service
+ fi
+}
diff --git a/meson.patch b/meson.patch
new file mode 100644
index 00000000000..43bf2f9424d
--- /dev/null
+++ b/meson.patch
@@ -0,0 +1,13 @@
+diff --unified --recursive --text mpd.old/mpd-0.21.7/meson.build mpd.new/mpd-0.21.7/meson.build
+--- mpd.old/mpd-0.21.7/meson.build 2019-04-15 20:59:22.702665429 +0300
++++ mpd.new/mpd-0.21.7/meson.build 2019-04-15 20:58:46.029169900 +0300
+@@ -368,6 +368,9 @@
+ if enable_database
+ subdir('src/storage')
+ subdir('src/db')
++else
++ db_glue_dep=dependency('', required: false)
++ storage_glue_dep=dependency('', required: false)
+ endif
+
+ if neighbor_glue_dep.found()
diff --git a/mpd.conf b/mpd.conf
new file mode 100644
index 00000000000..cbdee96f5fd
--- /dev/null
+++ b/mpd.conf
@@ -0,0 +1,10 @@
+# See: /usr/share/doc/mpd/mpdconf.example
+
+user "mpd"
+group "audio"
+pid_file "/run/mpd/mpd.pid"
+db_file "/var/lib/mpd/mpd.db"
+state_file "/var/lib/mpd/mpdstate"
+playlist_directory "/var/lib/mpd/playlists"
+bind_to_address "127.0.0.1"
+#music_directory "/home/user/music"
diff --git a/mpd.install b/mpd.install
new file mode 100644
index 00000000000..12742b90aa4
--- /dev/null
+++ b/mpd.install
@@ -0,0 +1,11 @@
+post_install() {
+ getent group mpd &>/dev/null || groupadd -r -g 45 mpd >/dev/null
+ getent passwd mpd &>/dev/null || useradd -r -u 45 -g mpd -d /var/lib/mpd -s /bin/false -G audio mpd >/dev/null
+ usr/bin/systemd-tmpfiles --create mpd.conf || true
+}
+
+post_remove() {
+ getent passwd mpd &>/dev/null && userdel mpd >/dev/null
+ getent group mpd &>/dev/null && groupdel mpd >/dev/null
+ true
+}
diff --git a/mpd.tmpfile b/mpd.tmpfile
new file mode 100644
index 00000000000..41c4e743a3a
--- /dev/null
+++ b/mpd.tmpfile
@@ -0,0 +1 @@
+d /run/mpd 0755 mpd mpd