may be working packaging for arch and alpine

This commit is contained in:
Er2 2021-11-09 21:24:13 +03:00
parent caad031aa1
commit 897a36e8e0
12 changed files with 120 additions and 34 deletions

2
.gitignore vendored
View file

@ -1,5 +1,5 @@
*~ *~
build/ build/
dist/ dist/*er2cord*
# may be in fatpak, maybe not # may be in fatpak, maybe not
.flatpak-builder .flatpak-builder

View file

@ -1,22 +1,22 @@
# FOR JUST BUILD USE MESON # You can still use meson, but can make
# THIS IS A PACKAGING TOOL
NAME = er2cord NAME = er2cord
BDIR = /tmp/$(NAME) DESTDIR ?= /
all: tar deb clean all: build
build: build/$(NAME)
base: build/$(NAME):
mkdir -p dist meson build
meson build --prefix=$(BDIR) ninja -C build
install: build
ninja -C build install ninja -C build install
tar: base docs: build
tar -C $(BDIR) -cvzf dist/$(NAME).tar.gz ./ mkdir -p "$(DESTDIR)"
find dist/ ! -name '*er2cord*' -exec cp -f "{}" "$(DESTDIR)" \;
deb: base
cp -r DEBIAN/ $(BDIR)
-dpkg-deb -b $(BDIR) dist/$(NAME).deb
clean: clean:
rm -rf build $(BDIR) rm -rf build

View file

@ -2,18 +2,5 @@
<gresources> <gresources>
<gresource prefix="/org/er2/cord"> <gresource prefix="/org/er2/cord">
<file>style.css</file> <file>style.css</file>
<!-- file alias="style-dark.css">style-dark.css</file>
<file alias="add-note-symbolic.svg">icons/scalable/add-note-symbolic.svg</file>
<file alias="notebook-symbolic.svg">icons/scalable/notebook-symbolic.svg</file>
<file alias="notebook-config-symbolic.svg">icons/scalable/notebook-config-symbolic.svg</file>
<file alias="title_menu.ui">ui/title_menu.ui</file>
<file alias="shortcuts.ui">ui/shortcuts.ui</file>
<file alias="main_window.ui">ui/main_window.ui</file>
<file alias="menu.ui">ui/menu.ui</file>
<file alias="note_theme.ui">ui/note_theme.ui</file>
<file alias="note_menu.ui">ui/note_menu.ui</file>
<file alias="trash_note_menu.ui">ui/trash_note_menu.ui</file>
<file alias="edit_notebooks.ui">ui/edit_notebooks.ui</file>
<file alias="move_to_dialog.ui">ui/move_to_dialog.ui</file -->
</gresource> </gresource>
</gresources> </gresources>

View file

@ -18,4 +18,4 @@ install_data(
install_dir: schemas_dir, install_dir: schemas_dir,
rename: [meson.project_name() + '.gschema.xml'] rename: [meson.project_name() + '.gschema.xml']
) )
meson.add_install_script('glib-compile-schemas', schemas_dir) #meson.add_install_script('glib-compile-schemas', schemas_dir)

View file

@ -1,9 +1,11 @@
project('org.er2.cord', ['vala', 'c'], version: '1.0') project('org.er2.cord', ['vala', 'c'], version: '0.1.0')
datadir = get_option('prefix') / get_option('datadir') datadir = get_option('prefix') / get_option('datadir')
name = 'er2cord'
conf = configuration_data() conf = configuration_data()
conf.set_quoted('ID', 'org.er2.cord') # meson.project_name()) conf.set_quoted('ID', meson.project_name())
conf.set_quoted('VERSION', meson.project_version()) conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('DATADIR', get_option('prefix') / get_option('datadir')) conf.set_quoted('DATADIR', get_option('prefix') / get_option('datadir'))
@ -44,7 +46,7 @@ subdir('data')
subdir('po') subdir('po')
executable( executable(
'er2cord', name,
source, source,
dependencies: deps, dependencies: deps,

34
tools/APKBUILD Normal file
View file

@ -0,0 +1,34 @@
# Maintainer: Er2 <er2@dismail.de>
pkgname=er2cord
pkgver=0.1.0
pkgrel=0
pkgdesc="WIP GTK4 Chat"
url="https://gitdab.com/er2/er2cord"
arch="all"
options="!check"
license="Zlib"
makedepends="gtk4.0-dev vala meson"
depends="gtk4.0"
install="$pkgname.post-install $pkgname.post-deinstall"
source="$pkgname.tar.gz"
subpackages="$pkgname-doc"
builddir="$srcdir/$pkgname"
prepare() {
default_prepare
}
build() {
make
}
package() {
DESTDIR="$pkgdir" make install
}
doc() {
pkgdesc="$pkgdesc (docs)"
DESTDIR="$subpkgdir" make docs
}

View file

@ -1,9 +1,9 @@
Package: er2cord Package: er2cord
Version: 1.0 Version: 0.1.0
Section: development Section: development
Priority: optional Priority: optional
Architecture: amd64 Architecture: amd64
Maintainer: Er2 <er2@dismail.de> Maintainer: Er2 <er2@dismail.de>
Depends: Depends: libgtk-4-1 (>= 4.1.0)
Homepage: https://gitdab.com/er2/er2cord Homepage: https://gitdab.com/er2/er2cord
Description: WIP GTK4 chat. Description: WIP GTK4 chat.

4
tools/DEBIAN/postinst Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
chmod +x /usr/bin/er2cord
glib-compile-schemas /usr/share/glib-2.0/schemas
exit 0

44
tools/PKGBUILD Normal file
View file

@ -0,0 +1,44 @@
# Maintainer: Er2 <er2@dismail.de>
pkgname=er2cord
pkgver=0.1.0
pkgrel=1
epoch=
pkgdesc="WIP GTK4 Chat"
arch=('any')
url="https://gitdab.com/er2/er2cord"
license=('Zlib')
groups=()
depends=('gtk4>=4.0')
makedepends=('vala>=0.54' 'meson>=0.60')
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=('er2cord.install')
changelog=
source=("$pkgname.tar.gz")
noextract=()
md5sums=()
validpgpkeys=()
prepare() {
cd "$pkgname"
}
build() {
cd "$pkgname"
make
}
check() {
# no checks ;)
}
package() {
cd "$pkgname"
make install
}

9
tools/er2cord.install Normal file
View file

@ -0,0 +1,9 @@
# Go to PKGBUILD
post_install() {
glib-compile-schemas /usr/share/glib-2.0/schemas
}
post_remove() {
glib-compile-schemas /usr/share/glib-2.0/schemas
}

View file

@ -0,0 +1 @@
/home/er2/proj/erc/tools/er2cord.post-install

View file

@ -0,0 +1,5 @@
#!/bin/sh
glib-compile-schemas /usr/share/glib-2.0/schemas
exit 0