Various updates and additions
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
AUX ymarks-server-constants.patch 649 BLAKE2B a726cd9df461df441b84923f2477af8b25e0df85fe0aa91131b495b9bca3e9119448b68bf7775666d8bfa18eae5e8fb707fdfbe49fab6cd271dbed0863063df1 SHA512 7bdb5cbcd07595c43281a9d67ff6186e0de6816a36921a696b05e2c760934a70f44331c1f048720dd2dcf855c2432e90dff791ed831f161ea81303477222cf19
|
||||
AUX ymarks.service 228 BLAKE2B 1d36be15f494f63ec04a9d5041cf417fb12901277044c07ea031650e0341980619b382dc646c05a9624d59f9bdc1ffe8b723554017cb8f73a1fbf8746b6ea389 SHA512 81e3ae34e97a64851751aa0e2d5edbed8e8bc3040abdc9cf2f8a239a017680f134de52287086d96fcb8581c2e7ef6ea87fd760a027b47bc205b740fe623216d5
|
||||
EBUILD ymarks-server-9999.ebuild 897 BLAKE2B e2b5cb56e8ef2ef0980b579bcbd08eac114b05a7b796dc5806401110f8b82a7ed5b41e52d841a306c5459a57ccc816478eda2249c3f59ad07b2b8bddb41532d8 SHA512 91a5582a0fd30cdfd16329a050a39c25f0968473e6d8b74b388a4bb7ec68c82e6579a5121be9ebb5227e82b68538a12faf42ce982f3946f80b8403e1656c59be
|
||||
@@ -0,0 +1,16 @@
|
||||
diff -ur ymarks-server-9999.orig/src/constants.h ymarks-server-9999/src/constants.h
|
||||
--- ymarks-server-9999.orig/src/constants.h 2018-05-21 22:35:56.623271162 +0200
|
||||
+++ ymarks-server-9999/src/constants.h 2018-05-21 22:37:02.882961737 +0200
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
|
||||
/* The port ymarks will bind its server component to: */
|
||||
-static const int SERVERPORT = 8888;
|
||||
+static const int SERVERPORT = 9999;
|
||||
|
||||
/* The folder in which backups will be created (if enabled): */
|
||||
-static const char* BACKUPFOLDER = ".";
|
||||
+static const char* BACKUPFOLDER = "/etc/ymarks";
|
||||
|
||||
/* The name of your database file: */
|
||||
static const char* SQLFILE = "ymarks.db";
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=ymarks-server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ymarks
|
||||
Group=ymarks
|
||||
WorkingDirectory=/etc/ymarks
|
||||
ExecStart=/etc/ymarks/ymarks &
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils user systemd
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
EHG_REPO_URI="https://bitbucket.org/ymarks/${PN}"
|
||||
inherit mercurial
|
||||
fi
|
||||
|
||||
DESCRIPTION="Simple KISS bookmark sync server"
|
||||
HOMEPAGE="https://www.ymarks.org"
|
||||
|
||||
LICENSE="WTFPL"
|
||||
SLOT="0"
|
||||
IUSE="systemd"
|
||||
|
||||
RDEPEND="dev-db/sqlite:3"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ymarks
|
||||
enewuser ymarks -1 /bin/bash /etc/ymarks ymarks
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eapply "${FILESDIR}/ymarks-server-constants.patch"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cc -I . -I /usr/include -o ymarks 3rdparty/cJSON.c src/backup.c src/main.c -lsqlite3
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto /etc/ymarks
|
||||
doexe ${S}/ymarks
|
||||
echo "12345" > "${D}"/etc/ymarks/PIN.txt
|
||||
fowners -R ymarks:ymarks /etc/ymarks
|
||||
|
||||
use systemd &&
|
||||
systemd_dounit "${FILESDIR}"/ymarks.service
|
||||
}
|
||||
Reference in New Issue
Block a user