Skip to content
Commits on Source (3)
......@@ -44,4 +44,5 @@ fpm -f -t deb -s dir -n zero-panel -v "$VERSION" \
--maintainer "Yuanle Song <sylecn@gmail.com>" \
--deb-priority optional \
--url "https://gitlab.emacsos.com/sylecn/zero-panel" \
--license Apache-2.0 \
-C "$DEST" .
#!/usr/bin/env python
# coding=utf-8
"""
fabric file for server automation.
Usage:
fab deploy
//deploy debug build to s01 VM.
BUILDDIR=release fab deploy
//deploy release build to s01 VM.
HOST=ryzen5root fab deploy
//deploy debug build to ryzen5
HOST=ryzen5root BUILDDIR=release fab deploy
//deploy release build to ryzen5
"""
# pylint: disable=line-too-long
import warnings
import os
from fabric.api import env, sudo, run, local, hosts, put, cd
env.use_ssh_config = True
TEST_HOST = os.getenv("HOST", "s01root")
DIR = os.getenv("BUILDDIR", "build")
@hosts(TEST_HOST)
def deploy():
local("ninja -C %s" % (DIR,))
run("mkdir -p /usr/share/zero-panel/")
put("zero-panel/zero-panel.ui", "/usr/share/zero-panel/zero-panel.ui")
put("zero-panel/zero-panel.css", "/usr/share/zero-panel/zero-panel.css")
run("pkill zero-panel || true")
put("%s/zero-panel" % (DIR,), "/home/sylecn/d/zero-panel")
run("chown sylecn:sylecn /home/sylecn/d/zero-panel")
run("chmod +x /home/sylecn/d/zero-panel")
put("zero-panel/com.emacsos.zero.Panel1.service",
"/usr/share/dbus-1/services/")
run("mkdir -p /usr/share/dbus-1/interfaces/")
put("zero-panel/com.emacsos.zero.Panel1.PanelInterface.xml",
"/usr/share/dbus-1/interfaces/")
run("systemctl reload dbus")
# module init
warnings.filterwarnings(action='ignore',module='.*paramiko.*')
# -*- mode: conf -*-
project('zero-panel', 'c',
version: '1.1.0',
version: '1.2.0',
license: 'EPL-2.0',
default_options: [
'warning_level=3',
......@@ -20,17 +20,16 @@ install_data('com.emacsos.zero.Panel1.service',
install_subdir('themes',
install_dir: '/usr/share/zero-panel/',
strip_directory: true)
install_data('zero-panel.1',
install_dir: '/usr/share/man/man1/')
install_man(['zero-panel.1'])
install_data('README',
install_dir: '/usr/share/doc/zero-panel/')
gen_inc = include_directories('.')
gdbus_codegen = find_program('gdbus-codegen')
zero_panel_generated = custom_target('zero-panel-generated',
input: 'com.emacsos.zero.Panel1.PanelInterface.xml',
output: ['zero-panel-generated.h', 'zero-panel-generated.c'],
install: true,
install_dir: [get_option('includedir') + '/' + 'zero-panel', false],
command: [gdbus_codegen, '--generate-c-code', 'zero-panel-generated', '@INPUT@'])
# warning_level 3 -Wpedantic requires this change.
......@@ -43,11 +42,21 @@ zero_panel_generated_c_fixed = custom_target('zero-panel-generated-fixed.c',
gtk3 = dependency('gtk+-3.0')
# a library for zero-panel C clients
install_headers('zero-panel.h', subdir: 'zero-panel')
pkg = import('pkgconfig')
lib = library('zero-panel',
[zero_panel_generated_c_fixed],
dependencies: [gtk3],
install: true)
pkg.generate(lib, subdirs: 'zero-panel')
# zero-panel executable
zero_panel = [
zero_panel_generated_c_fixed,
'server.c']
executable('zero-panel', zero_panel,
include_directories: gen_inc,
dependencies: [gtk3],
install: true,
install_dir: '/home/sylecn/d/')
......@@ -55,5 +64,4 @@ executable('zero-panel', zero_panel,
executable('zero-panel-client-demo',
[zero_panel_generated_c_fixed,
'client-demo.c'],
include_directories: gen_inc,
dependencies: [gtk3])