diff --git a/.gitignore b/.gitignore index fe132e0..c09d55f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.log *.log.* -jitsi-stats.db jilo.db +packaging/deb-package/ +packaging/rpm-package/ diff --git a/packaging/build-deb b/packaging/build-deb new file mode 100755 index 0000000..e02e4c6 --- /dev/null +++ b/packaging/build-deb @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +VERSION=$1 + +mkdir -p deb-package +cd deb-package +mkdir -p "jilo-$VERSION/DEBIAN" "jilo-$VERSION/etc" "jilo-$VERSION/usr/bin" "jilo-$VERSION/usr/share/doc/jilo" "jilo-$VERSION/usr/share/man/man8" + +cp ../deb-control "jilo-$VERSION/DEBIAN/control" +cp ../../jilo.conf "jilo-$VERSION/etc/jilo.conf" +cp ../../jilo "jilo-$VERSION/usr/bin/" +cp ../../jilo-cli "jilo-$VERSION/usr/bin/" +cp ../../CHANGELOG.md "jilo-$VERSION/usr/share/doc/jilo/" +cp ../../LICENSE "jilo-$VERSION/usr/share/doc/jilo/" +cp ../../README.md "jilo-$VERSION/usr/share/doc/jilo/" +cp ../../TODO.md "jilo-$VERSION/usr/share/doc/jilo/" +cp ../../log-regexps.md "jilo-$VERSION/usr/share/doc/jilo/" +cp ../man-jilo.8 "jilo-$VERSION/usr/share/man/man8/jilo.8" + +dpkg-deb --build "jilo-$VERSION" + +rm -rf "jilo-$VERSION/" \ No newline at end of file diff --git a/packaging/build-rpm b/packaging/build-rpm new file mode 100755 index 0000000..a77c611 --- /dev/null +++ b/packaging/build-rpm @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +VERSION=$1 +RELEASE=1 + +mkdir -p rpm-package/SOURCES rpm-package/SPECS +cd rpm-package + +PACKAGE_DIR="jilo-$VERSION" + +mkdir -p "$PACKAGE_DIR" + +cp ../../jilo.conf "$PACKAGE_DIR/" +cp ../../jilo "$PACKAGE_DIR/" +cp ../../jilo-cli "$PACKAGE_DIR/" +cp ../../CHANGELOG.md "$PACKAGE_DIR/" +cp ../../LICENSE "$PACKAGE_DIR/" +cp ../../README.md "$PACKAGE_DIR/" +cp ../../TODO.md "$PACKAGE_DIR/" +cp ../../log-regexps.md "$PACKAGE_DIR/" +cp ../man-jilo.8 "$PACKAGE_DIR/" +cp ../rpm-jilo.spec SPECS/ + +tar -czf "jilo-$VERSION.tar.gz" "$PACKAGE_DIR" +mv "jilo-$VERSION.tar.gz" SOURCES/ +rm -rf "$PACKAGE_DIR" + +rpmbuild --define "_topdir $(pwd)" --define "VERSION $VERSION" --define "RELEASE $RELEASE" -ba SPECS/jilo.spec + diff --git a/packaging/deb-control b/packaging/deb-control new file mode 100644 index 0000000..4d1190f --- /dev/null +++ b/packaging/deb-control @@ -0,0 +1,11 @@ +Package: jilo +Version: 0.1 +Section: utils +Priority: optional +Architecture: all +Maintainer: Yasen Pramatarov +Description: Jitsi logs observer + Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs. + This package contains the 'jilo' logs collecting tool and 'jilo-cli' command line events searching tool. +Homepage: https://lindeas.com/jilo +Depends: bash, sqlite3 | mysql-client | mariadb-client, coreutils, util-linux diff --git a/packaging/man-jilo.8 b/packaging/man-jilo.8 new file mode 100644 index 0000000..9bde7d6 --- /dev/null +++ b/packaging/man-jilo.8 @@ -0,0 +1,59 @@ +.TH JILO "8" "June 2024" "jilo 0.1" +.SH NAME +jilo \- Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs. +.SH SYNOPSIS +.B jilo +[\fIoptions\fR] +.SH DESCRIPTION +.B jilo +is a bash scripts for collecting and displaying information about conference events from Jitsi Meet logs. + +This is the logs collecting tool ('jilo'). If you want to search through an already populated databae, use the command line tool 'jilo-cli'. + +.SH OPTIONS +.TP +.B \-d, \-\-create\-db +Create (or recreate) the database. +.TP +.B \-f, \-\-flush +Flush an existing database. +.TP +.B \-c, \-\-check +Check the consistency of the database and the status of the log files. +.TP +.B \-p, \-\-parse +Parse the log file(s) and enter the data found in the database. +.TP +.B \-v, \-\-verbose +Verbose mode with more details shown. Can be used together with \-c, \-p +.TP +.B \-h, \-\-help +Display help message. +.TP +.B \-V, \-\-version +Display version information. + +.SH EXAMPLES +Create the database, as configured in jilo.conf (or use the defaults). If the database already exists, it drops it and recreates it: +.B jilo -d + +Check the consistency of the database and show detils about the logs: +.B jilo -c -v + +Parse the logs in verbose mode, with progress indication: +.B jilo -p -v + +.SH CONFIGURATION +The configuration file is /etc/jilo.conf. + +.SH AUTHOR +Written and maintained by Yasen Pramatarov + +.SH HOMEPAGE +https://lindeas.com/jilo + +.SH VERSION +0.1 + +.SH SEE ALSO +jilo-cli(8) diff --git a/packaging/rpm-jilo.spec b/packaging/rpm-jilo.spec new file mode 100644 index 0000000..5625dea --- /dev/null +++ b/packaging/rpm-jilo.spec @@ -0,0 +1,50 @@ +Name: jilo +Version: 0.1.1 +Release: 1%{?dist} +Summary: Jitsi logs observer +License: GPLv2 +URL: https://lindeas.com/jilo +Source0: %{name}-%{version}.tar.gz +BuildArch: noarch +BuildRequires: bash +Requires: bash, sqlite3 | mysql-client | mariadb-client, coreutils, util-linux + +%description +Bash scripts for collecting and displaying information about conference events from Jitsi Meet logs. +This package contains the 'jilo' logs collecting tool and 'jilo-cli' command line events searching tool. + +%prep +%setup -q + +%install +# directories +mkdir -p %{buildroot}/etc +mkdir -p %{buildroot}/usr/bin +mkdir -p %{buildroot}/usr/share/doc/%{name} +mkdir -p %{buildroot}/usr/share/man/man8 + +# then copy the files +cp %{sourcedir}/jilo.conf %{buildroot}/etc/jilo.conf +cp %{sourcedir}/jilo %{buildroot}/usr/bin/ +cp %{sourcedir}/jilo-cli %{buildroot}/usr/bin/ +cp %{sourcedir}/CHANGELOG.md %{buildroot}/usr/share/doc/%{name}/ +cp %{sourcedir}/LICENSE %{buildroot}/usr/share/doc/%{name}/ +cp %{sourcedir}/README.md %{buildroot}/usr/share/doc/%{name}/ +cp %{sourcedir}/TODO.md %{buildroot}/usr/share/doc/%{name}/ +cp %{sourcedir}/log-regexps.md %{buildroot}/usr/share/doc/%{name}/ +cp %{sourcedir}/man-jilo.8 %{buildroot}/usr/share/man/man8/jilo.8 + +%files +/etc/jilo.conf +/usr/bin/jilo +/usr/bin/jilo-cli +/usr/share/doc/%{name}/CHANGELOG.md +/usr/share/doc/%{name}/LICENSE +/usr/share/doc/%{name}/README.md +/usr/share/doc/%{name}/TODO.md +/usr/share/doc/%{name}/log-regexps.md +/usr/share/man/man8/jilo.8 + +%changelog +* Wed Jun 12 2024 Yasen Pramatarov 0.1.1 +- Initial build