-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Meson build system, appstream metadata and RPM&Yum pieces #161
Open
cschalle
wants to merge
20
commits into
jamiemcg:master
Choose a base branch
from
cschalle:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
82b8da0
Adding files for yum repo testing
cschalle 2448a8f
Add Meson build system
cschalle b18ef95
commit final changes and tarball build script
cschalle f9ebac5
Update release script
cschalle a0b3144
Temporary commit of release script
cschalle 1807b12
Add updated spec file
cschalle 65ce7c5
Update build files with fixes
cschalle 8f2c49f
Comment out icon cache generation
cschalle 5d93853
Update build file and spec file with further fixes
cschalle de91754
update meson.build to hopefully fix build issue
cschalle 1f9d0e2
Try to fix build to set python directory properly
cschalle 3ab8c9e
Add some fixes that should hopefully allow correct python location te…
cschalle 7b5b2ab
More updates
cschalle 46490df
update with even further fixes :)
cschalle 3ebac96
Add hyphens
cschalle 4c3670a
Fix stupid typo
cschalle a80f714
Update path append statement
cschalle aa1338a
add prefix to path
cschalle d3ed19f
export full path to application
cschalle c1b9631
Add .repo file to repository
cschalle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Build started at 2017-05-01T21:52:57.292575 | ||
Python binary: /usr/bin/python3 | ||
Python system: Linux | ||
The Meson build system | ||
Version: 0.40.0 | ||
Source dir: /home/cschalle/devel/remarkable/bin | ||
Build dir: /home/cschalle/devel/remarkable/bin/build | ||
Build type: native build | ||
|
||
Meson encountered an error: | ||
First statement must be a call to project | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version = '1.87' | ||
|
||
|
||
message('Getting python directiories') | ||
|
||
py3_mod = import('python3') | ||
py3 = py3_mod.find_python() | ||
|
||
py3_version = py3_mod.language_version() | ||
if py3_version.version_compare('< 3.2') | ||
error('Invalid python version!?') | ||
endif | ||
|
||
py3_purelib = py3_mod.sysconfig_path('purelib') | ||
if not py3_purelib.endswith('site-packages') | ||
error('Python3 purelib path seems invalid?') | ||
endif | ||
|
||
message('Python version installed : ' + py3_version) | ||
message('Python library path : ' + py3_purelib) | ||
pythonlibpath=join_paths(get_option('prefix'),py3_purelib) | ||
# Configuration params | ||
|
||
cdata = configuration_data() | ||
cdata.set('PACKAGE', '"Remarkable"') | ||
# Configuration params | ||
cdata.set('PACKAGE_URL', 'https://remarkableapp.github.io/') | ||
cdata.set('VERSION', version) | ||
cdata.set('PYTHON_LIB_PATH', pythonlibpath) | ||
|
||
|
||
message('Preparing init file') | ||
configure_file(input : 'remarkable.in', output : 'remarkable', configuration : cdata, install_dir : 'bin') | ||
message('generated binary') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
gnome = import('gnome') | ||
|
||
|
||
|
||
|
||
message('Compiling schemas') | ||
gnome.compile_schemas() | ||
install_data( | ||
'net.launchpad.remarkable.gschema.xml', | ||
install_dir : 'share/glib-2.0/schemas') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
message('Installing Tutorial data') | ||
install_data('MarkdownTutorial.md', install_dir : 'share/remarkable/media/') | ||
|
||
|
||
message('Installing desktop icon') | ||
install_data('remarkable.png', install_dir : 'share/icons/hicolor/256x256/apps') | ||
install_data('remarkable.svg', install_dir : 'share/icons/hicolor/scaleable/apps/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
install_subdir('ui', install_dir: 'share/remarkable') | ||
|
||
message('Preparing appdata') | ||
install_data('remarkable.appdata.xml', install_dir : 'share/appdata') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop"> | ||
<id>remarkable.desktop</id> | ||
<metadata_license>CC-BY-3.0</metadata_license> | ||
<project_license>MIT</project_license> | ||
<name>Remarkable Markdown Editor</name> | ||
<summary>Remarkable is a powerful markdown editor available for Linux. It is fully featured and customizable.</summary> | ||
<description> | ||
<p> | ||
Remarkable is a full featured and powerful markdown editor that allows you to quickly edit and work with documents in markdown format. | ||
</p> | ||
</description> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image>https://remarkableapp.github.io/images/main_screenshot.png</image> | ||
</screenshot> | ||
</screenshots> | ||
<url type="homepage">https://remarkableapp.github.io</url> | ||
<url type="bugtracker">https://github.com/jamiemcg/Remarkable/issues</url> | ||
<url type="donation">https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B5PJTSJNFYGT2</url> | ||
<project_group>GNOME</project_group> | ||
<update_contact>Jamie McGowan - jamiemcgowan.dev@gmail.com</update_contact> | ||
<translation>None</translation> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
test -n "$srcdir" || srcdir=$1 | ||
test -n "$srcdir" || srcdir=. | ||
echo 'Done testing for src dir' | ||
|
||
cd $srcdir | ||
|
||
echo 'Getting version number from git' | ||
VERSION=$(git describe --tags --abbrev=0) | ||
echo 'Setting name' | ||
NAME="remarkable-${VERSION}" | ||
|
||
echo "Creating git tree archive…" | ||
git archive --prefix="${NAME}/" --format=tar HEAD > ${NAME}.tar | ||
|
||
echo "Compressing archive…" | ||
xz --verbose -f "${NAME}.tar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
project('remarkable', 'c') | ||
|
||
version = '1.87' | ||
|
||
# Configuration params | ||
conf = configuration_data() | ||
conf.set('PACKAGE_VERSION', version) | ||
conf.set('PACKAGE_URL', 'https://remarkableapp.github.io/') | ||
|
||
message('Looking for dependencies') | ||
py3 = find_program('python3') | ||
glib = dependency('glib-2.0') | ||
gobject = dependency('gobject-2.0') | ||
gir = dependency('gobject-introspection-1.0') | ||
gtk = dependency('gtk+-3.0', version : '>=3.13.2') | ||
|
||
message('Getting python install dir') | ||
r = run_command(py3, '-c', 'from distutils.sysconfig import get_python_lib; print(get_python_lib())') | ||
if r.returncode() != 0 | ||
error('Cannot find python install dir') | ||
endif | ||
python_dir = r.stdout().strip() | ||
|
||
subdir('data/glib-2.0/schemas') | ||
subdir('data/media') | ||
subdir('data') | ||
subdir('bin') | ||
|
||
message('Install source code medata') | ||
install_data('LICENSE', install_dir : 'share/doc/remarkable') | ||
install_data('README.md', install_dir : 'share/doc/remarkable') | ||
|
||
message('Installing Python files') | ||
install_subdir('pdfkit', install_dir: python_dir) | ||
install_subdir('markdown', install_dir: python_dir) | ||
install_subdir('remarkable', install_dir: python_dir) | ||
install_subdir('remarkable_lib', install_dir: python_dir) | ||
|
||
message('Installing .desktop file') | ||
install_data('remarkable.desktop', install_dir : 'share/applications') | ||
|
||
meson.add_install_script('meson_install.sh') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# Update icon caches | ||
#gtk-update-icon-cache -f -t ${DESTDIR}/${MESON_INSTALL_PREFIX}/share/icons/hicolor | ||
#gtk-update-icon-cache -f -t ${DESTDIR}/${MESON_INSTALL_PREFIX}/share/icons/HighContrast | ||
|
||
# Install new schemas | ||
glib-compile-schemas ${DESTDIR}/${MESON_INSTALL_PREFIX}/share/glib-2.0/schemas/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[remarkable] | ||
name=Remarkable Markdown editor software and updates | ||
baseurl=https://raw.githubusercontent.com/cschalle/hubyum/master/noarch | ||
gpgcheck=0 | ||
enabled=1 | ||
enabled_metadata=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Summary: Markdown editor | ||
Name: remarkable | ||
Version: 1.87 | ||
Release: 1 | ||
|
||
Source: https://github.com/jamiemcg/Remarkable/archive/remarkable-%{version}.tar.xz | ||
Packager: uraeus@gnome.org | ||
License: MIT | ||
Group: Applications/Productivity | ||
URL: https://remarkableapp.github.io/ | ||
BuildRoot: %{_tmppath}/remarkable-%{version}-%{release}-root-%(%{__id_u} -n) | ||
|
||
Requires: python3 | ||
BuildRequires: python3-devel | ||
BuildRequires: meson | ||
|
||
BuildArch: noarch | ||
|
||
%description | ||
Remarkable markdown editor application. Allows you to edit in Markdown format for use with Wikis. | ||
|
||
%prep | ||
%autosetup | ||
|
||
%build | ||
|
||
%meson | ||
%meson_build | ||
desktop-file-validate remarkable.desktop | ||
%meson_install | ||
|
||
%post | ||
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%files | ||
%defattr(-,root,root,-) | ||
%doc LICENSE README.md | ||
%{_bindir}/remarkable | ||
%{python3_sitelib}/remarkable | ||
%{python3_sitelib}/remarkable_lib | ||
%{python3_sitelib}/markdown/extensions | ||
%{python3_sitelib}/pdfkit | ||
%{_datadir}/glib-2.0/schemas | ||
%{_datadir}/remarkable/ui | ||
%{_datadir}/icons/hicolor/256x256/apps/remarkable.png | ||
%{_datadir}/icons/hicolor/scaleable/apps/remarkable.svg | ||
%{_datadir}/remarkable/media/MarkdownTutorial.md | ||
%{_datadir}/appdata/remarkable.appdata.xml | ||
%{_datadir}/applications/remarkable.desktop | ||
|
||
%changelog | ||
* Thu Apr 27 2017 Christian F.K. Schaller <uraeus@gnome.org> | ||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import platform | ||
import subprocess | ||
import sys | ||
|
||
from distutils import sysconfig | ||
|
||
|
||
def get_python_abiflags(): | ||
return sysconfig.get_config_var("ABIFLAGS") | ||
|
||
def get_python_libloc(): | ||
# OSX is a pain. Python as shipped by apple installs libpython in /usr/lib | ||
# so we hardcode that. Other systems can use --with-libpython-dir to | ||
# override this. | ||
if platform.system().lower() == 'darwin': | ||
return '/usr/lib' | ||
|
||
pylib_loc = sysconfig.get_config_var("LIBPL") | ||
pylib_ldlibrary = sysconfig.get_config_var("LDLIBRARY") | ||
|
||
py_sharedlib = os.path.join(pylib_loc, pylib_ldlibrary) | ||
if os.path.exists(py_sharedlib): | ||
return pylib_loc | ||
|
||
# Workaround for Fedora | ||
pylib_loc = sysconfig.get_config_var("LIBDIR") | ||
pylib_ldlibrary = sysconfig.get_config_var("LDLIBRARY") | ||
|
||
py_sharedlib = os.path.join(pylib_loc, pylib_ldlibrary) | ||
if os.path.exists(py_sharedlib): | ||
return pylib_loc | ||
|
||
return "None" | ||
|
||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) > 3: | ||
print("At most 2 arguments accepted") | ||
exit(1) | ||
|
||
if sys.argv[1] == '--abiflags': | ||
print(get_python_abiflags()) | ||
elif sys.argv[1] == '--sosuffix': | ||
get = sysconfig.get_config_var | ||
suffix = get("EXT_SUFFIX") or get("SO") or ".so" | ||
print(suffix[1:]) | ||
elif sys.argv[1] == '--pygi-overridedir': | ||
prefix = sys.argv[2] | ||
version = sys.version_info | ||
|
||
# If we are installing in the same prefix as PyGobject | ||
# make sure to install in the right place. | ||
import gi | ||
if os.path.commonprefix([gi._overridesdir, prefix]) == prefix: | ||
print(gi._overridesdir) | ||
exit(0) | ||
|
||
# Otherwise follow python's way of install site packages inside | ||
# the provided prefix | ||
if os.name == 'posix': | ||
print(os.path.join( | ||
prefix, 'lib', 'python%d.%d' % (version.major, version.minor), | ||
'site-packages', 'gi', 'overrides')) | ||
else: | ||
print(os.path.join( | ||
prefix, 'Lib', 'Python%d%d' % (version.major, version.minor), | ||
'site-packages', 'gi', 'overrides')) | ||
elif sys.argv[1] == '--libloc': | ||
print(get_python_libloc()) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete your personal
meson-log.txt
file from this pull request.By the way, do you know what this message means? "First statement must be a call to project"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope