Skip to content

Commit

Permalink
Merge pull request #6 from LiuLang/master
Browse files Browse the repository at this point in the history
pull updates
  • Loading branch information
MJsaka committed Nov 12, 2014
2 parents c58dfe2 + a596a3c commit 2dd6df0
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 69 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
data/
README.md.html
*~
71 changes: 52 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
这个项目用于存放kwplayer为各个发行版打好了的安装包, 推荐一般用户直接使用
这里的安装包, 因为这最简单, 也最不易出问题.


Debian系
=========
deb包里已经默认加入了Debian软件库中不存在的软件包, 这是为了方便.
=======
deb包里已经默认加入了Debian软件库中不存在的软件包, 比如python3-keybinder.

先下载kwplayer.deb, 如果安装了Gdebi等工具, 可以直接双击就能安装这个deb包;
当然, 也可以在终端里安装:
先下载kwplayer.deb, 可以直接双击就能安装这个deb包. 当然, 也可以在终端里安装:

# dpkg -i kwplayer.deb
# apt-get -f install


Fedora系
========
Fedora 的打包工作是由Wang Jiezhe (@wangjiezhe) 负责. 目前测试成功了Fedora19
和Fedora20.
=======
Fedora 的打包工作是由 Wang Jiezhe (@wangjiezhe) 负责.

首先要安装好rpmfushion, 可以参考这篇文章:<http://blog.csdn.net/sabalol/article/details/9286073>

**建议安装方式:**

只需要下载这个rpm包就可以了. 安装的话: `# yum localinstall kwplayer-x.x.rpm`
升级的话: `# yum localupdate kwplayer-x.x.rpm`, 这样的话,
系统会自动处理软件包依赖问题. 使用时有遇到问题的, 请尽快反馈,
这样的话就可以很快修复问题.
使用 dnf 并安装 dnf-plugins-core, 然后直接运行:

打包脚本在build_rpm/里.
# dnf copr enable wangjiezhe/kwplayer
# dnf install kwplayer

其他可选包:
即可.

* python3-plyvel
* [python3-mutagenx](https://github.com/LordSputnik/mutagen)
* [python3-xlib](https://github.com/LiuLang/python3-xlib)
* [python3-keybinder](https://github.com/LiuLang/python3-keybinder)
或者直接到 <http://copr.fedoraproject.org/coprs/wangjiezhe/kwplayer/> 下载对应的
repo 文件放到 /etc/yum.repos.d/ 中, 然后运行

# yum install kwplayer

**注: 因为有几个依赖包不在官方源内, 请使用上面的 repo 文件, 否则直接安装 rpm 包可能会出错**


Arch Linux
Expand All @@ -42,9 +42,42 @@ Arch Linux用户, 可以直接使用build_arch/PKGBUILD脚本来安装kwplayer,
MJsaka <qiuxuenan@gmail.com> 维护的. 使用时有什么问题, 可以直接联系他.
非常感谢他做的工作.


Gentoo
========
======
Gentoo的用户, 可下载build_gentoo下的ebuild, 放入本地的overlay, 执行
`ebuild kwplayer-*.ebuild manifest`, 然后`emerge kwplayer`安装.
也可以直接下载tbz2包放入${PKGDIR}里, 然后`emerge -k kwplayer`安装.
使用时有什么问题, 请联系 MJsaka <qiuxuenan@gmail.com> .


打包时要包含的依赖包
===================
在制作一个发行版里的安装包时, 要包含以下依赖包. 不同发行版里的包名可能不尽相同:

* gnome-icon-theme-symbolic
* gstreamer1.0-libav 音频/视频的解码器
* gstreamer1.0-plugins-base
* gstreamer1.0-plugins-good
* gstreamer1.0-plugins-ugly
* gstreamer1.0-pulseaudio
* gstreamer1.0-x
* gir1.2-gstreamer-1.0,
* gir1.2-gst-plugins-base-1.0
* gir1.2-notify-0.7 - notify 的Gtk绑定.
* python3
* python3-cairo
* python3-dbus
* python3-gi - gkt3的python3绑定
* python3-gi-cairo
* python3-ply - Lex, Yacc的python3实现, kwplayer用它来解析歌词

可选安装包, 安装它们后, kwplayer的功能更完善:

* mutagen - https://github.com/LordSputnik/mutagen, kwplayer用它来转化mp3标签
编码
* python3-xlib - https://github.com/LiuLang/python3-xlib, X的底层接口, 这个是从python-xlib迁移过来的, python3-keybinder需要这个包
* python3-keybinder https://github.com/LiuLang/python3-keybinder, 用于绑定
全局快捷键
* leveldb - 强大的NoSQL数据库(用于缓存数据), kwplayer用它来缓存列表
* python3-leveldb - leveldb的python3绑定
21 changes: 0 additions & 21 deletions README.md.html

This file was deleted.

8 changes: 8 additions & 0 deletions build_arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
# This PKGBUILD published with the GPLv3 license

pkgname=kwplayer
<<<<<<< HEAD
pkgver=3.3.7
=======
pkgver=3.4.6
>>>>>>> 530b3e14b3c1d9a92e0ab7be1c3020085decf0fd
pkgrel=1
pkgdesc='An elegant music player which can get songs from kuwo.cn'
arch=('any')
Expand All @@ -13,7 +17,11 @@ url="https://github.com/LiuLang/kwplayer"
depends=('python>=3.3' 'python-dbus' 'python-gobject' 'python-ply' 'gstreamer' 'gst-libav' 'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-ugly' 'gnome-icon-theme-symbolic')
optdepends=('python-mutagenx: convert ID3 tag from GBK to UTF-8' 'leveldb: local cache database' 'plyvel: python3 binding of leveldb' 'python-xlib: X11 library for python' 'python-keybinder: to support global keyboard shortcuts')
source=("https://pypi.python.org/packages/source/k/kwplayer/${pkgname}-${pkgver}.tar.gz")
<<<<<<< HEAD
md5sums=('8f4f702f90a380094b4d0df717266340')
=======
md5sums=('91415ec957df4d5a81f041cbd64d4834')
>>>>>>> 530b3e14b3c1d9a92e0ab7be1c3020085decf0fd

build() {
cd "${srcdir}/${pkgname}-${pkgver}"
Expand Down
4 changes: 2 additions & 2 deletions build_deb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# project inited.

SRC="../.."
KW_SRC="$SRC/kuwomusic"
MUT_SRC="$SRC/mutagenx/mutagenx"
KW_SRC="$SRC/kwplayer"
MUT_SRC="$SRC/mutagen/mutagen"
XLIB_SRC="$SRC/python3-xlib/Xlib"
KEYBIND_SRC="$SRC/python3-keybinder/keybinder"

Expand Down
7 changes: 3 additions & 4 deletions build_deb/control
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
Package: kwplayer
Version: 3.3.4-4
Version: 3.4.6-1
Architecture: all
Maintainer: LiuLang<gsushzhsosgsu@gmail.com>
Installed-Size: 1720
Depends: python3-gi, gstreamer1.0-libav|gstreamer0.10-ffmpeg, gstreamer1.0-plugins-base|gstreamer0.10-plugins-base, gstreamer1.0-plugins-good|gstreamer0.10-plugins-good, gstreamer1.0-plugins-ugly|gstreamer0.10-plugins-ugly, gir1.2-gstreamer-1.0|gir1.2-gstreamer-0.10, gir1.2-gst-plugins-base-1.0|gir1.2-gst-plugins-base-0.10, gir1.2-notify-0.7, gnome-icon-theme-symbolic, python3-dbus
Recommends: python3-leveldb
Depends: python3-gi, gstreamer1.0-libav|gstreamer0.10-ffmpeg, gstreamer1.0-plugins-base|gstreamer0.10-plugins-base, gstreamer1.0-plugins-good|gstreamer0.10-plugins-good, gstreamer1.0-plugins-ugly|gstreamer0.10-plugins-ugly, gir1.2-gstreamer-1.0|gir1.2-gstreamer-0.10, gir1.2-gst-plugins-base-1.0|gir1.2-gst-plugins-base-0.10, gir1.2-notify-0.7, gnome-icon-theme-symbolic, python3-dbus, python3-leveldb, python3-cairo, python3-gi-cairo, python3-ply
Section: gnome
Priority: optional
Homepage: https://github.com/LiuLang/kwplayer
Description: An elegant music player which can get songs from kuwo.cn
Description: Music player for linux users
KW music player is used to get music resources from Internet. It can also
play MV, show lyrics and show photo albums of artists.
27 changes: 13 additions & 14 deletions build_rpm/kwplayer.spec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# kwplayer.spec
# Used to build rpm for kwplayer on Fedora 19/20
# Used to build rpm for kwplayer on Fedora
# Released by wangjiezhe <wangjiezhe@gmail.com>
# This spec file is published under the GPLv3 license

# Template is originally generated by "rpmdev-newspec -t python"

%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python3_lib; print(get_python3_lib())")}
%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

Name: kwplayer
Version: 3.3.4
Release: 2%{?dist}
Version: 3.4.5
Release: 1%{?dist}
Summary: An elegant music player which can get songs from kuwo.cn

License: GPLv3
Expand All @@ -18,7 +18,6 @@ Source: %{name}-%{version}.tar.gz

# Followings are not needed by Fedora after 17 and will be ignored by rpmbuild
# Group: Applications/Multimedia
# BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch: noarch
BuildRequires: python3-devel
Expand All @@ -38,10 +37,10 @@ Requires: pulseaudio-module-x11
# Not installed by default in KDE
Requires: gnome-icon-theme-symbolic
# Optional:
# Requires: leveldb
# Requires: python3-plyvel
# Requires: mutagenx
# Requires: python3-keybinder
Requires: leveldb
Requires: python3-plyvel
Requires: python3-mutagen
Requires: python3-keybinder

%description
KW music player is used to get music resources from Internet.
Expand Down Expand Up @@ -77,12 +76,12 @@ rm -rf $RPM_BUILD_ROOT
%exclude %{python3_sitelib}/kuwo/__pycache__

%post
cd /usr/lib/python3.3/site-packages
cd %{python3_sitelib}
for file in kwplayer*
do
if [ -f $file ] && [ $file != "kwplayer-%{version}-py3.3.egg-info" ]
then
rm $file
fi
if [ -f $file ] && [ $file != "kwplayer-%{version}-py3.3.egg-info" ]
then
rm $file
fi
done

5 changes: 3 additions & 2 deletions build_rpm/makerpm-kwplayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ DEST="$HOME"/Downloads/github/wangjiezhe/kwplayer-packages
SOURCES="$HOME"/rpmbuild/SOURCES
SPECS="$HOME"/rpmbuild/SPECS
RPMS="$HOME"/rpmbuild/RPMS/noarch
SRPMS="$HOME"/rpmbuild/SRPMS

if [ ! -f "$SPECS"/bcloud.spec ]
then
Expand All @@ -55,5 +56,5 @@ rpmbuild -ba kwplayer.spec
cp kwplayer.spec "$DEST"/build_rpm/
# cp makerpm-kwplayer.sh "$DEST"/build_rpm/

cd "$RPMS"/
cp kwplayer-"$version"-"$release".fc20.noarch.rpm "$DEST"/
cp "$RPMS"/kwplayer-"$version"-"$release".fc20.noarch.rpm "$DEST"/
cp "$SRPMS"/kwplayer-"$version"-"$release".fc20.src.rpm "$DEST"/build_rpm/
8 changes: 4 additions & 4 deletions checksum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cebfc8fd75a0f04a79183ccb46a8f2a5 kwplayer-3.3.4-1.fc20.noarch.rpm
86c9ee0114651ac133af6be1b2d96f4e kwplayer-3.3.4-2-any.pkg.tar.xz
864fced7813209b2e9840053497939ba kwplayer_3.3.4-4_all.deb
82099c76f80164cc0ed8a450724cf5cf kwplayer-3.3.4.tbz2
7b5a0550622c1a3f2f519113c36abba1 kwplayer-3.3.5-1-any.pkg.tar.xz
dc45a8931d02da59f246b48ebd083a9b kwplayer-3.3.5.tbz2
6254a42dd0de5df187b6b898b7b6056a kwplayer-3.4.5-1.fc21.noarch.rpm
ed114be94fffb19f19e727ac9bb348ce kwplayer_3.4.6-1_all.deb
Binary file removed kwplayer-3.3.4-2.fc20.noarch.rpm
Binary file not shown.
Binary file added kwplayer-3.4.5-1.fc21.noarch.rpm
Binary file not shown.
Binary file removed kwplayer_3.3.4-4_all.deb
Binary file not shown.
Binary file added kwplayer_3.4.6-1_all.deb
Binary file not shown.

0 comments on commit 2dd6df0

Please sign in to comment.