1 # Maintainer: Matt Parnell/ilikenwf
2 # Contributor: Matt Parnell/ilikenwf
4 # Note: the maintainer/contributor of this package is also the
5 # de-facto head developer of the nightingale project...
6 # this script thus gets some extra TLC since I use arch
8 # If you're reading this, WE NEED MORE DEVELOPERS!
9 # If you know C++, XUL, and are familiar with the mozilla SDK,
10 # contact parwok@gmail.com or join our irc on MozNet #nightingale
11 # or the forums at getnightingale.com/forum
13 pkgname=nightingale-git
16 pkgdesc="Community port of nightingale to be more Linux native. Working git version is nightingale 1.8 compatible."
17 arch=('i686' 'x86_64')
18 url="http://getnightingale.com/"
19 license=('GPL2' 'MPL' 'BSD')
20 makedepends=('git' 'bash' 'subversion' 'python2' 'tar' 'wget')
21 depends=('gstreamer0.10' 'gstreamer0.10-base' 'gtk2' 'libxt' 'sqlite3' 'gstreamer0.10-good-plugins'
22 'gstreamer0.10-bad-plugins' 'gstreamer0.10-ffmpeg' 'gstreamer0.10-ugly-plugins')
25 provides=('nightingale' 'nightingale-git')
26 install=nightingale.install
27 source=('proper_gst_path_archlinux.patch' 'Nightingale.desktop')
28 md5sums=('93d7e61400661def1957b3be9243f332'
29 '7741cc247648e95dd9dad8c953616757')
31 # Only use git if you want a 2.8gb directory sitting in your build
32 # dir! Otherwise, just use the snapshot, it's updated every time
33 # the git is since the project uses github!
35 _tarball="https://github.com/nightingale-media-player/nightingale-hacking/tarball/nightingale-1.8"
39 _gitroot="git://github.com/nightingale-media-player/nightingale-hacking.git"
40 _gitname="nightingale"
41 _branch="nightingale-1.8"
45 if [ $use_git = "yes" ]; then
46 # NOTE: master is in development, it WILL NOT BUILD
47 if [ ! -d "$_gitname" ]; then
49 msg2 "Cloning initial copy of zen-sources..."
50 warning "This may take some time depending on your available bandwidth."
52 git clone --depth 1 "$_gitroot" "$_gitname"
54 _no_update="y" # update is not necessary
57 if [ "$_no_update" = "y" ]; then
58 msg2 "Skipping tree update..."
60 cd "$srcdir/$_gitname"
62 msg2 "Updating local tree..."
64 msg2 "Attempting to merge changes..."
66 if ! "git merge origin/$_branch"; then
67 error "Merging failed..."
69 msg2 "Fixing local repository..."
70 git checkout -f "$_branch"
72 git reset --hard "origin/$_branch"
75 error "Update failed..."
78 warning "Press ENTER if you want to continue or CTRL+C to abort..."
82 cd "$srcdir/$_gitname"
83 git checkout -f "$_branch"
85 msg "Downloading the tarball from github."
88 if [ ! -f "$_branch.tar.gz" ]; then
89 wget -O "$_branch.tar.gz" $_tarball
92 tar xvf "$_branch.tar.gz"
94 if [ -d nightingale ]; then
98 mv nightingale-media-player-nightingale-hacking-* nightingale
103 mkdir -p ${pkgdir}/opt/nightingale/
104 cd "${srcdir}/$_gitname/compiled/dist"
105 cp -a * ${pkgdir}/opt/nightingale/
107 install -d --group=users ${pkgdir}/opt/nightingale
109 chmod 755 ${pkgdir}/opt/nightingale/nightingale
110 chmod 755 ${pkgdir}/opt/nightingale/nightingale-bin
111 chmod 755 ${pkgdir}/opt/nightingale/xulrunner/xulrunner
112 chmod 755 ${pkgdir}/opt/nightingale/xulrunner/xulrunner-bin
113 chmod -R a+r ${pkgdir}/opt/nightingale
114 install -D "${srcdir}/$_gitname/compiled/dist"/chrome/icons/default/default.xpm \
115 ${pkgdir}/usr/share/pixmaps/nightingale.xpm
116 install -D -m644 ${srcdir}/Nightingale.desktop \
117 ${pkgdir}/usr/share/applications/Nightingale.desktop
126 # I know this is lazy, but needing this svn stuff is temporary
127 # The below if statement/block will be removed in the next version
128 if [ ! -d "${srcdir}/nightingale/dependencies/linux-$(arch)" ] ; then
129 msg "Grabbing a few Nightingale specific dependencies"
130 msg "Don't worry, This won't be necessary with the next version, hopefully"
131 msg "A lot of what we're grabbing here aren't even used..."
132 msg2 "This WILL take a while, so don't freak out and cancel if nothing happens for 30sec - 1min"
134 cd "${srcdir}/nightingale/dependencies"
136 # Seriously, songbird devs...you didn't have to make it use all this static crap for linux builds...
137 # understandable for Mac and Windows...but I mean, come on...
138 # as the dev of nightingale, I'm working to not need this cruft, since our system provides these pkgs
139 _svnroot="http://ngale.svn.sourceforge.net/svnroot/ngale/branches/dependencies/Nightingale1.8/linux-$(arch)"
140 mkdir -p "linux-$(arch)"/{xulrunner/release,mozilla/release,taglib/release,sqlite/release}
142 cd "${srcdir}/nightingale/dependencies/linux-$(arch)/xulrunner/release"
143 svn co $_svnroot/xulrunner/release ./
145 cd "${srcdir}/nightingale/dependencies/linux-$(arch)/mozilla/release"
146 svn co $_svnroot/mozilla/release ./
148 cd "${srcdir}/nightingale/dependencies/linux-$(arch)/taglib/release"
149 svn co $_svnroot/taglib/release ./
151 cd "${srcdir}/nightingale/dependencies/linux-$(arch)/sqlite/release"
152 svn co $_svnroot/sqlite/release ./
155 cd "${srcdir}/$_gitname"
157 # our gstreamer path, since we use system libs :)
158 export GST_PLUGIN_PATH="/usr/lib/gstreamer-0.10"
160 # use our own gstreamer libs
161 grep -sq gstreamer-system nightingale.config || ( echo 'ac_add_options --with-media-core=gstreamer-system' nightingale.config )
163 # force the buildscripts to use python2 to avoid breakage
164 export PYTHON="/usr/bin/python2"
166 # clobber just in case we're rebuilding, as we've probably pulled new code down
167 make -f nightingale.mk clobber
170 make -f nightingale.mk
172 # edit the launcher so it always uses the correct gstreamer path...
173 # without this music playback wouldn't work
174 # I'm using an arch specific patch so we don't have to use the generic one
175 patch -Np0 -i ../proper_gst_path_archlinux.patch compiled/dist/nightingale
180 # free up over 600 mb
181 cd "${srcdir}/$_gitname"
183 # copy the extensions first
184 if [ -d ../xpi-stage ]; then
187 cp -a "${srcdir}/$_gitname/compiled/xpi-stage" "${srcdir}"
189 make -f nightingale.mk clobber
191 msg "Note that the last.FM extension is in $srcdir/xpi-stage/audioscrobbler."
192 msg "If you want to use it, you'll need to install it manually after running Nightingale. Your mileage may vary."