Commit cdfd1319 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui Committed by Cédric Bellegarde

autotools to meson (#1145)

* autotools to meson

* add missing files (due to .gitignore)

* update .appdata to the latest version

* add help, po & portal as submodules

* remove portal from submodules, include po & help into meson.build

* bump version number

* add gnome module (needed for yelp)

* update install instructions & dependecies

* cleaner README3

* move po & help to subprojects directory

* remove folders

* update git modules

* Update po path

* update submodules

* add meson post install & fixes lollypop-sp destnation
parent 95267abc
*~
/lollypop-cli
/po
/help
/*.bak
/*.lo
/*.o
......@@ -73,7 +71,6 @@ data/Makefile
data/Makefile.in
flatpak/metadata
*.pyc
lollypop
*.valid
/src/Makefile.in
/data/AboutDialog.ui
......@@ -83,3 +80,5 @@ lollypop
/flatpak/*.bundle
/flatpak/*.flatpak
/flatpak/.flatpak-builder
/builddir
.vscode/
[submodule "subprojects/help"]
path = subprojects/help
url = https://github.com/gnumdk/lollypop-help
[submodule "subprojects/po"]
path = subprojects/po
url = https://github.com/gnumdk/lollypop-po
ACLOCAL_AMFLAGS = -I m4
NULL =
bin_SCRIPTS = lollypop
dist_bin_SCRIPTS = lollypop-cli\
rhythmbox2lollypop
SUBDIRS = src data po help search-provider
EXTRA_DIST = \
lollypop.in\
lollypop-cli.in
$(NULL)
CLEANFILES = \
$(bin_SCRIPTS)\
lollypop-cli\
$(NULL)
MAINTAINERCLEANFILES = \
$(srcdir)/AUTHORS \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/compile \
$(srcdir)/config.guess \
$(srcdir)/config.h.in \
$(srcdir)/config.sub \
$(srcdir)/configure.scan \
$(srcdir)/depcomp \
$(srcdir)/install-sh \
$(srcdir)/ltmain.sh \
$(srcdir)/missing \
$(srcdir)/mkinstalldirs \
$(NULL)
GITIGNOREFILES = \
m4 \
$(NULL)
lollypop: lollypop.in Makefile
$(AM_V_GEN)sed \
-e s!\@srcdir\@!$(abs_top_srcdir)! \
-e s!\@prefix\@!$(prefix)! \
-e s!\@datadir\@!$(datadir)! \
-e s!\@pkgdatadir\@!$(pkgdatadir)! \
-e s!\@libexecdir\@!$(libexecdir)! \
-e s!\@libdir\@!$(libdir)! \
-e s!\@pkglibdir\@!$(pkglibdir)! \
-e s!\@PYTHON\@!$(PYTHON)! \
-e s!\@localedir\@!$(localedir)! \
-e s!\@pythondir\@!$(pythondir)! \
-e s!\@pyexecdir\@!$(pyexecdir)! \
-e s!\@PACKAGE\@!$(PACKAGE)! \
-e s!\@VERSION\@!$(VERSION)! \
< $< > $@
chmod a+x $@
lollypop-cli: lollypop-cli.in Makefile
$(AM_V_GEN)sed \
-e s!\@srcdir\@!$(abs_top_srcdir)! \
-e s!\@prefix\@!$(prefix)! \
-e s!\@datadir\@!$(datadir)! \
-e s!\@pkgdatadir\@!$(pkgdatadir)! \
-e s!\@libexecdir\@!$(libexecdir)! \
-e s!\@libdir\@!$(libdir)! \
-e s!\@pkglibdir\@!$(pkglibdir)! \
-e s!\@localedir\@!$(localedir)! \
-e s!\@pythondir\@!$(pythondir)! \
-e s!\@pyexecdir\@!$(pyexecdir)! \
-e s!\@PACKAGE\@!$(PACKAGE)! \
-e s!\@VERSION\@!$(VERSION)! \
< $< > $@
chmod a+x $@
all-local: lollypop lollypop-cli
-include $(top_srcdir)/git.mk
......@@ -4,7 +4,6 @@
Lollypop is a new GNOME music playing application.
- For users: http://gnumdk.github.io/lollypop-web
- For packagers: You need to provide https://github.com/gnumdk/lollypop-portal
......@@ -14,6 +13,7 @@ Lollypop is a new GNOME music playing application.
For translators: https://www.transifex.com/projects/p/lollypop/
It provides:
- mp3/4, ogg and flac.
- Genre/Cover browsing
- Genre/Artist/Cover browsing
......@@ -32,59 +32,53 @@ It provides:
- Tunein support
## Depends on
- gtk3 >= 3.14
- gobject-introspection
- gir1.2-gstreamer-1.0 (Debian)
- python3
- intltool (make)
- itstool (make)
- totem-plparser
- python (make)
- python-cairo
- python-dbus
- python-gobject
- python-sqlite
- python-pylast >= 1.0
- `gtk3 >= 3.14`
- `gobject-introspection`
- `appstream-glib`
- `gir1.2-gstreamer-1.0 (Debian)`
- `python3`
- `meson >= 0.41`
- `ninja`
- `totem-plparser`
- `python-cairo`
- `python-dbus`
- `python-gobject`
- `python-sqlite`
- `python-pylast >= 1.0`
## Building from git
```
```bash
$ git clone https://github.com/gnumdk/lollypop.git
$ cd lollypop
$ ./autogen.sh
$ make
# make install
$ meson builddir --prefix=/usr
# sudo ninja -C builddir install
```
In case you want the integration with [Last.fm](http://last.fm) to work you need to install `pylast`
```
```bash
# apt-get install python3-pip
# pip3 install pylast
```
### On Debian (Jessie)
```
```bash
$ git clone https://github.com/gnumdk/lollypop.git
$ cd lollypop
# apt-get install autoconf libglib2.0-dev intltool yelp-tools libgirepository1.0-dev libgtk-3-dev
$ ./autogen.sh
$ make
# make install
```
Instead of `make install` you might want to use `checkinstall`
```
# apt-get install checkinstall
# checkinstall
# apt-get install meson libglib2.0-dev yelp-tools libgirepository1.0-dev libgtk-3-dev
$ meson builddir --prefix=/usr
# sudo ninja -C builddir install
```
This will allow you to uninstall Lollypop as a package, for example with `apt-get uninstall lollypop`.
### On Fedora
```
```bash
$ git clone https://github.com/gnumdk/lollypop.git
$ cd lollypop
# sudo dnf install autoconf glib2-devel intltool yelp-tools gtk3-devel gobject-introspection-devel python3 itstool
$ ./autogen.sh
$ make
# make install
# sudo dnf install meson glib2-devel yelp-tools gtk3-devel gobject-introspection-devel python3
$ meson builddir --prefix=/usr
# sudo ninja -C builddir install
```
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
[ ! -d "$srcdir"/po ] && git clone https://github.com/gnumdk/lollypop-po.git "$srcdir"/po
[ ! -d "$srcdir"/help ] && git clone https://github.com/gnumdk/lollypop-help.git "$srcdir"/help
(test -f $srcdir/configure.ac) || {
echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level project directory"
exit 1
}
PKG_NAME=`autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac"`
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
echo "**Warning**: I am going to run \`configure' with no arguments." >&2
echo "If you wish to pass any to it, please specify them on the" >&2
echo \`$0\'" command line." >&2
echo "" >&2
fi
set -x
aclocal --install || exit 1
glib-gettextize --force --copy || exit 1
#gtkdocize --copy || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install -Wno-portability || exit 1
{ set +x; } 2>/dev/null
if [ "$NOCONFIGURE" = "" ]; then
set -x
$srcdir/configure "$@" || exit 1
{ set +x; } 2>/dev/null
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type \`make\' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
fi
AC_PREREQ(2.63)
AC_INIT([lollypop],
[0.9.242],
[https://github.com/gnumdk/lollypop],
[lollypop],
[https://github.com/gnumdk/lollypop])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability subdir-objects])
AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AM_PATH_PYTHON(3.0)
AM_PYTHON_CHECK_VERSION(3.0)
GETTEXT_PACKAGE=lollypop
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
IT_PROG_INTLTOOL(0.26)
PKG_PROG_PKG_CONFIG([0.22])
GLIB_GSETTINGS
YELP_HELP_INIT
GOBJECT_INTROSPECTION_REQUIRE([1.35.9])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.14])
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
AC_CONFIG_FILES([
Makefile
data/Makefile
data/AboutDialog.ui
src/Makefile
help/Makefile
search-provider/Makefile
po/Makefile.in
])
AC_OUTPUT
......@@ -8,7 +8,7 @@
<property name="destroy_with_parent">True</property>
<property name="type_hint">normal</property>
<property name="program_name">Lollypop</property>
<property name="version">@PACKAGE_VERSION@</property>
<property name="version">@VERSION@</property>
<property name="copyright">Copyright © 2014-2016 Cédric Bellegarde</property>
<property name="comments" translatable="yes">A music player for GNOME.</property>
<property name="website">@PACKAGE_URL@</property>
......@@ -73,8 +73,8 @@ http://www.onlinewebfonts.com/icon (Last.fm icon)
<property name="uri">https://www.paypal.me/lollypopgnome</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
......
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate-dependencies $(builddir)/lollypop.gresource.xml)
lollypop.gresource: lollypop.gresource.xml $(resource_files)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir) $<
resourcedir = $(pkgdatadir)
resource_DATA = lollypop.gresource
appsdir = $(datadir)/applications
apps_DATA = org.gnome.Lollypop.desktop
@INTLTOOL_DESKTOP_RULE@
appdatadir = $(datadir)/appdata
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
appdata_in_files = org.gnome.Lollypop.appdata.xml.in
@INTLTOOL_XML_RULE@
# hicolor icons
hicolor_icon16dir = $(datadir)/icons/hicolor/16x16/apps
hicolor_icon16_DATA = icons/hicolor/16x16/apps/org.gnome.Lollypop.png
hicolor_icon22dir = $(datadir)/icons/hicolor/22x22/apps
hicolor_icon22_DATA = icons/hicolor/22x22/apps/org.gnome.Lollypop.png
hicolor_icon32dir = $(datadir)/icons/hicolor/32x32/apps
hicolor_icon32_DATA = icons/hicolor/32x32/apps/org.gnome.Lollypop.png
hicolor_icon48dir = $(datadir)/icons/hicolor/48x48/apps
hicolor_icon48_DATA = icons/hicolor/48x48/apps/org.gnome.Lollypop.png
hicolor_icon256dir = $(datadir)/icons/hicolor/256x256/apps
hicolor_icon256_DATA = icons/hicolor/256x256/apps/org.gnome.Lollypop.png
hicolor_iconscalabledir = $(datadir)/icons/hicolor/scalable/apps
hicolor_iconscalable_DATA = icons/hicolor/scalable/apps/org.gnome.Lollypop-symbolic.svg
hicolor_placescalabledir = $(datadir)/icons/hicolor/scalable/places
hicolor_placescalable_DATA = icons/hicolor/scalable/apps/lollypop-spotify-symbolic.svg icons/hicolor/scalable/apps/lollypop-itunes-symbolic.svg icons/hicolor/scalable/apps/lollypop-lastfm-symbolic.svg
hicolor_icon_files = \
$(hicolor_icon16_DATA) \
$(hicolor_icon22_DATA) \
$(hicolor_icon32_DATA) \
$(hicolor_icon48_DATA) \
$(hicolor_icon256_DATA) \
$(hicolor_iconscalable_DATA)\
$(hicolor_placescalable_DATA)\
icons/hicolor/org.gnome.Lollypop.svg
gtk_update_hicolor_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
gtk_update_hicontrast_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/HighContrast
install-data-hook: update-icon-cache
uninstall-hook: update-icon-cache
update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk hicolor icon cache."; \
$(gtk_update_hicolor_icon_cache); \
echo "Updating Gtk highcontrast icon cache."; \
$(gtk_update_hicontrast_icon_cache); \
else \
echo "*** Icon cache not updated. After (un)install, run this:"; \
echo "*** $(gtk_update_hicolor_icon_cache)"; \
echo "*** $(gtk_update_hicolor_icon_cache)"; \
fi
gsettings_SCHEMAS = org.gnome.Lollypop.gschema.xml
# For uninstalled use
gschemas.compiled: $(gsettings_SCHEMAS) Makefile
$(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) $(builddir)
@GSETTINGS_RULES@
EXTRA_DIST = \
$(hicolor_icon_files) \
$(resource_files) \
org.gnome.Lollypop.appdata.xml.in \
org.gnome.Lollypop.desktop.in \
lollypop.gresource.xml \
org.gnome.Lollypop.gschema.xml \
$(NULL)
CLEANFILES = \
lollypop.gresource \
org.gnome.Lollypop.appdata.xml \
$(apps_DATA) \
*.valid \
gschemas.compiled \
$(NULL)
all-local: gschemas.compiled
-include $(top_srcdir)/git.mk
icon_themes = ['hicolor']
foreach theme : icon_themes
install_subdir(theme, install_dir: 'share/icons/')
endforeach
gnome = import('gnome')
message('Compiling resources')
gnome.compile_resources(
meson.project_name(),
meson.project_name() + '.gresource.xml',
gresource_bundle: true,
source_dir: '.',
install_dir: DATA_DIR,
install: true,
dependencies: configure_file(
input: 'AboutDialog.ui.in',
output: 'AboutDialog.ui',
configuration: conf
)
)
message('Compiling schemas')
gnome.compile_schemas()
install_data(
project_id + '.gschema.xml',
install_dir: 'share/glib-2.0/schemas'
)
message('Making a .desktop file')
i18n.merge_file(
output: project_id + '.desktop',
input: project_id + '.desktop.in',
po_dir: '../subprojects/po',
type: 'desktop',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
message('Preparing appdata')
i18n.merge_file(
output: project_id + '.appdata.xml',
input: project_id + '.appdata.xml.in',
po_dir: '../subprojects/po',
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata')
)
message('Making a list of icons')
subdir('icons')
<?xml version="1.0" encoding="UTF-8"?>
<application>
<id type="desktop">org.gnome.Lollypop.desktop</id>
<licence>CC0</licence>
<_name>Lollypop</_name>
<_summary>Play and organize your music collection</_summary>
<description>
<_p>
Lollypop is a new GNOME music playing application.
</_p>
<_p>
It provides:
</_p>
<ul>
<_li> MP3, Ogg and FLAC playback</_li>
<_li> Web playback</_li>
<_li> Genre/Cover browsing</_li>
<_li> Genre/Artist/Cover browsing</_li>
<_li> Search</_li>
<_li> Queue</_li>
<_li> Party mode</_li>
<_li> Replay gain</_li>
<_li> Cover art downloader</_li>
<_li> Context artist view</_li>
<_li> MTP sync</_li>
<_li> Fullscreen view</_li>
<_li> Radios support</_li>
<_li> Last.fm support</_li>
<_li> Auto install codecs</_li>
<_li> HiDPI support</_li>
<_li> TuneIn support</_li>
</ul>
</description>
<screenshots>
<screenshot type="default" width="800" height="439">https://raw.githubusercontent.com/gnumdk/lollypop-data/master/main_small.jpg</screenshot>
</screenshots>
<url type="homepage">https://github.com/gnumdk/lollypop</url>
<updatecontact>cedric.bellegarde@adishatz.org</updatecontact>
</application>
<component type="desktop">
<id>org.gnome.Lollypop.desktop</id>
<licence>CC0</licence>
<name>Lollypop</name>
<summary>Play and organize your music collection</summary>
<description>
<p>
Lollypop is a new GNOME music playing application.
</p>
<p>
It provides:
</p>
<ul>
<li>MP3, Ogg and FLAC playback</li>
<li>Web playback</li>
<li>Genre/Cover browsing</li>
<li>Genre/Artist/Cover browsing</li>
<li>Search</li>
<li>Queue</li>
<li>Party mode</li>
<li>Replay gain</li>
<li>Cover art downloader</li>
<li>Context artist view</li>
<li>MTP sync</li>
<li>Fullscreen view</li>
<li>Radios support</li>
<li>Last.fm support</li>
<li>Auto install codecs</li>
<li>HiDPI support</li>
<li>TuneIn support</li>
</ul>
</description>
<screenshots>
<screenshot type="default" width="800" height="439">https://raw.githubusercontent.com/gnumdk/lollypop-data/master/mainsmall.jpg</screenshot>
</screenshots>
<url type="homepage">https://gnumdk.github.io/lollypop-web/</url>
<url type="bugtracker">https://github.com/gnumdk/lollypop/issues</url>
<updatecontact>cedric.bellegarde@adishatz.org</updatecontact>
</component>
[Desktop Entry]
_Name=Lollypop
_GenericName=Music Player
_Comment=Play and organize your music collection
Name=Lollypop
GenericName=Music Player
Comment=Play and organize your music collection
Icon=org.gnome.Lollypop
Exec=lollypop %U
Terminal=false
......@@ -13,13 +13,13 @@ MimeType=application/ogg;application/x-ogg;application/x-ogm-audio;audio/aac;aud
Actions=Toggle;Next;Prev;
[Desktop Action Toggle]
_Name=Play/Pause
Name=Play/Pause
Exec=lollypop -t
[Desktop Action Next]
_Name=Next
Name=Next
Exec=lollypop -n
[Desktop Action Prev]
_Name=Previous
Name=Previous
Exec=lollypop -p
......@@ -13,9 +13,9 @@
import sys
# Make sure we'll find the pygobject module, even in JHBuild
sys.path.insert(1, '@pyexecdir@')
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
# Make sure we'll find the lollypop modules, even in JHBuild
sys.path.insert(1, '@pythondir@')
sys.path.insert(1, '@PYTHON_DIR@')
import gi
gi.require_version('Secret', '1')
gi.require_version('TotemPlParser', '1.0')
......@@ -120,7 +120,7 @@ class Application(Gtk.Application):
if __name__ == '__main__':
app = Application()
larg = len(sys.argv)
if larg == 1:
......
#!@PYTHON@
#!/usr/bin/env python3
import sys
import signal
......@@ -10,14 +10,14 @@ if 'LOLLYPOP_TRACE' in os.environ:
from pycallgraph import PyCallGraph
from pycallgraph.output import GraphvizOutput
# Make sure we'll find the pygobject module, even in JHBuild
sys.path.insert(1, '@pyexecdir@')
sys.path.insert(1, '@PYTHON_EXEC_DIR@')
# Make sure we'll find the lollypop modules, even in JHBuild
sys.path.insert(1, '@pythondir@')
sys.path.insert(1, '@PYTHON_DIR@')
from gi.repository import Gio
localedir = '@localedir@'
pkgdatadir = '@pkgdatadir@'
localedir = '@LOCALE_DIR@'
pkgdatadir = '@DATA_DIR@'
from lollypop.application import Application
......@@ -35,7 +35,7 @@ def install_excepthook():
if __name__ == "__main__":
install_excepthook()
locale.bindtextdomain('lollypop', localedir)
locale.textdomain('lollypop')
gettext.bindtextdomain('lollypop', localedir)
......