summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxgdgsc2016-05-22 16:20:31 +0800
committerxgdgsc2016-05-22 16:20:31 +0800
commitc984cfb1ae62367ea51637b65e922c61ebc27966 (patch)
tree1b439ada87ef9992bce1e957276dcd09a3b11471
parentd15f64aab23a011304e8f2f457f1727ef81eaa65 (diff)
downloadaur-c984cfb1ae62367ea51637b65e922c61ebc27966.tar.gz
upg
-rw-r--r--PKGBUILD34
1 files changed, 12 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c874f3b684a..fe02857b569 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: xgdgsc <xgdgsc at gmail dot com>
pkgname=feeluown
_pkgname=FeelUOwn
-pkgver=6.0release
+pkgver=9.2a
pkgrel=1
pkgdesc="个性化音乐服务 For Mac And Linux"
arch=("any")
@@ -12,45 +12,35 @@ optdepends=('vlc')
provides=("feeluown")
conflicts=("feeluown")
source=("https://github.com/cosven/FeelUOwn/archive/v$pkgver.tar.gz")
-md5sums=('10a4d146b96a0dd256bc3fd3a05b521f')
+md5sums=('975d67b1f75cab38f25418cefa300fb9')
_desktop="${_pkgname}.desktop"
-build() {
+prepare() {
cd "$srcdir/$_pkgname-$pkgver"
cat > ${_desktop} << EOF
[Desktop Entry]
Type=Application
Name=FeelUOwn
Comment=FeelUOwn Launcher
-Exec=${_pkgname}
+Exec=${pkgname}
Icon=/usr/share/${pkgname}/icons/FeelUOwn.png
Categories=AudioVideo;Audio;Player;Qt;
Terminal=false
StartupNotify=true
EOF
-
- cat > "${_pkgname}.sh" << EOF
-#!/usr/bin/env sh
-DATA_PATH="\${HOME}/.${_pkgname}"
-if [ ! -d \${DATA_PATH} ]; then
- mkdir -p \${DATA_PATH}
-fi
-python /usr/share/${pkgname}/${pkgname}/main.py
-EOF
-
- # save login data to ~/.FeelUOwn
- cd "$srcdir/$_pkgname-$pkgver/feeluown"
- sed -i '2 i import os' constants.py
- sed -i 's!^DATA_PATH.*$!DATA_PATH = os.path.join(os.path.expanduser("~"), ".FeelUOwn/")!g' constants.py
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
- find ./{feeluown,icons} -type f -exec install -Dm644 {} \
- "${pkgdir}/usr/share/${pkgname}/{}" \;
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ python3 setup.py install --root="${pkgdir}" --optimize=1
+ echo "#!/usr/bin/env sh" > "${pkgdir}/usr/bin/feeluown"
+ echo "python -c 'from feeluown import __main__ as fu;fu.main()' \"\$@\"" >> "${pkgdir}/usr/bin/feeluown"
+
+ rm -f "${pkgdir}/usr/bin/"{'feeluown-install-dev','feeluown-genicon','feeluown-update'}
+
+ install -Dm644 './feeluown/feeluown.png' "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
install -Dm644 "${srcdir}/$_pkgname-$pkgver/${_desktop}" "${pkgdir}/usr/share/applications/${_desktop}"
- install -Dm755 "${srcdir}/$_pkgname-$pkgver/${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
}