-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the workflow file [.github/workflows/linux-build.yml] and some te…
…mplates and algos files in the dir [templates] allowing to build and install deb packages
- Loading branch information
1 parent
a0c8372
commit 37bfdc0
Showing
111 changed files
with
6,678 additions
and
0 deletions.
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,85 @@ | ||
name: Build FlameRobin for Debian | ||
|
||
env: | ||
wx-tag-version: v3.2.6 | ||
flamerobin-version: 0.9.13 | ||
|
||
on: | ||
push: | ||
branches: [ "**" ] | ||
pull_request: | ||
branches: [ "**" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Installing required dependencies | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y build-essential cmake libwxgtk3.2-dev dpkg-dev libfbclient2 firebird3.0-server firebird3.0-utils firebird-dev firebird3.0-server-core firebird3.0-common | ||
sudo ldconfig | ||
# Cache wxWidgets if already built | ||
- name: wxWidget cache | ||
id: cache-wxwidget | ||
uses: actions/cache@v4 | ||
with: | ||
path: wxWidgets | ||
key: ${{ runner.os }}-wxwidgets-${{env.wx-tag-version}} | ||
restore-keys: ${{ runner.os }}-wxwidgets-${{env.wx-tag-version}} | ||
|
||
# Clone and compile wxWidgets if not already cached | ||
- if: ${{ steps.cache-wxwidget.outputs.cache-hit != 'true' }} | ||
name: Clone wxWidgets | ||
run: git clone --recursive --branch ${{ env.wx-tag-version }} --depth 1 https://github.com/wxWidgets/wxWidgets.git | ||
|
||
- if: ${{ steps.cache-wxwidget.outputs.cache-hit != 'true' }} | ||
name: Build wxWidgets | ||
run: | | ||
cd wxWidgets | ||
mkdir build && cd build | ||
cmake .. -DCMAKE_BUILD_TYPE=Release | ||
make -j$(nproc) | ||
sudo make install | ||
sudo ldconfig | ||
# Building the CMake project for Flamerobin | ||
- name: Generate CMake project | ||
run: cmake -S . -B Build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local | ||
|
||
# FlameRobin Compilation | ||
- name: Build Flamerobin | ||
run: cmake --build Build --config Release -j$(nproc) | ||
|
||
# Check where the generated binary is (flamerobin) | ||
- name: Locate the compiled executable file for flamerobin | ||
run: | | ||
find Build/ -name "flamerobin" -type f | ||
du -skh Build/flamerobin | ||
# Set the version of the flamerobin program and move its executable to templates/trees/deb/flamerobin/usr/local/bin | ||
- name: Set the version of the Flamerobin program and move its executable to "templates/trees/deb/flamerobin/usr/local/bin" | ||
run: | | ||
sed -i "s/^Version: .*/Version: ${FLAMEROBIN_VERSION}/" templates/trees/deb/flamerobin/DEBIAN/control | ||
mkdir -p templates/trees/deb/flamerobin/usr/local/bin 2> /dev/null | ||
cp -r Build/flamerobin templates/trees/deb/flamerobin/usr/local/bin | ||
env: | ||
FLAMEROBIN_VERSION: ${{ env.flamerobin-version }} | ||
|
||
# Generate the .deb file | ||
- name: Build .deb package | ||
run: | | ||
dpkg-deb --build templates/trees/deb/flamerobin templates/trees/deb/flamerobin-${{ env.flamerobin-version }}.deb | ||
# Uploading the installer as a GitHub Actions artifact | ||
- name: Upload .deb package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: flamerobin-deb | ||
path: templates/trees/deb/flamerobin-${{ env.flamerobin-version }}.deb |
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 @@ | ||
Package: flamerobin | ||
Version: 0.9.13 | ||
Section: base | ||
Priority: optional | ||
Architecture: all | ||
Maintainer: Baldé <[email protected]> | ||
Depends: bash, coreutils, tar, acl, libc6, libstdc++6, build-essential, systemd, libtommath-dev, libwxgtk3.2-dev, software-properties-common, curl, bc, gzip, awk, gawk, zsh, util-linux | ||
Description: FlameRobin is a lightweight, cross-platform software tool designed for the | ||
administration of databases using the Firebird DBMS (Database Management System). | ||
It allows developers and database administrators to easily interact with their Firebird | ||
databases, providing practical features to manage, manipulate, and optimize database structures | ||
and data. |
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,43 @@ | ||
#!/usr/bin/bash | ||
|
||
##### | ||
# postinst script | ||
#### | ||
|
||
set -o pipefail | ||
|
||
|
||
|
||
# | ||
ldconfig | ||
|
||
### Check to see who executes the `flamerobin` program, then get the personnal directory | ||
# of this user -> start tag[k0] | ||
|
||
# Declaration variables | ||
flagBehalfSudo="" | ||
getPersonalUserDir="$HOME" | ||
getTheRealUser="$USER" | ||
|
||
# | ||
if [[ -n "$SUDO_USER" ]] | ||
then | ||
# | ||
flagBehalfSudo="$SUDO_USER" | ||
getTheRealUser="$SUDO_USER" | ||
|
||
# Get the personnel directory of the user | ||
getPersonalUserDir=` getent passwd "$flagBehalfSudo" | cut -d ":" -f6 ` | ||
fi | ||
|
||
### Check to see who executes the `flamerobin` program, then get the personnel directory | ||
# of this user -> end tag[k0] | ||
|
||
|
||
|
||
# Just to print the name of the author | ||
echo "" | ||
echo "" | ||
echo "~" | ||
|
||
tput setaf 6; tput bold; echo "By Baldé ~" `tput sgr0` 2> /dev/null |
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,86 @@ | ||
#!/usr/bin/bash | ||
|
||
# | ||
set -o pipefail | ||
|
||
|
||
##### | ||
# Action before deploying the program | ||
##### | ||
|
||
|
||
|
||
# Declaration variables | ||
getOS="" | ||
|
||
|
||
|
||
### Action on the directory `/tmp` and others -> start tag[v0] | ||
|
||
if [[ ! ( -e "/tmp" ) ]] | ||
then | ||
|
||
# | ||
mkdir -p /tmp 2> /dev/null | ||
chmod 777 /tmp 2> /dev/null | ||
|
||
# Check the value of return of the last command | ||
if [[ $? -ne 0 ]] | ||
then | ||
echo "~" | ||
echo "This program is not compatible with your system ." | ||
exit 1 | ||
fi | ||
|
||
# Get kernel | ||
getOS=` uname --operating-system ` | ||
|
||
# | ||
if [[ $getOS != "GNU/Linux" ]] | ||
then | ||
echo "~" | ||
echo "This program is not compatible with your system ." | ||
exit 1 | ||
fi | ||
|
||
fi | ||
|
||
### Action on the directory `/tmp` and others -> end tag[v0] | ||
|
||
|
||
|
||
### The system must have a GLIBC greater or equal to 2.39 -> start tag[m0] | ||
|
||
# Retrieve the current version of GLIBC | ||
GLIBC_VERSION=$(ldd --version | head -n 1 | awk '{print $NF}') | ||
|
||
# | ||
if [[ -z "$GLIBC_VERSION" ]] | ||
then | ||
# | ||
echo "~" | ||
echo -e "\033[1;31mError\033[0m : An error when \033[1;32mldd\033[0m command is executed ." | ||
exit 1 | ||
fi | ||
|
||
# Extract the major and minor part | ||
GLIBC_MAJOR=$(echo "$GLIBC_VERSION" | cut -d "." -f 1) | ||
GLIBC_MINOR=$(echo "$GLIBC_VERSION" | cut -d "." -f 2) | ||
|
||
# Checking the minimum required version (2.39) | ||
if [[ $GLIBC_MAJOR -lt 2 ]] | ||
then | ||
# | ||
echo "~" | ||
echo -e "\033[1;31mError\033[0m : Your system must have \033[1;32mGLIBC 2.39 or higher\033[0m ." | ||
exit 1 | ||
|
||
elif [[ $GLIBC_MAJOR -eq 2 && $GLIBC_MINOR -lt 39 ]]; | ||
then | ||
# | ||
echo "~" | ||
echo -e "\033[1;31mError\033[0m : Your system must have \033[1;32mGLIBC 2.39 or higher\033[0m ." | ||
exit 1 | ||
fi | ||
|
||
### The system must have a GLIBC greater or equal to 2.39 -> end tag[m0] |
2 changes: 2 additions & 0 deletions
2
templates/trees/deb/flamerobin/etc/ld.so.conf.d/firebird.conf
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,2 @@ | ||
/opt/firebird/lib | ||
/usr/local/lib |
6 changes: 6 additions & 0 deletions
6
templates/trees/deb/flamerobin/etc/profile.d/flamerobin-path-env-exec.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,6 @@ | ||
#!/bin/bash | ||
|
||
|
||
|
||
# Add Firebird and other custom paths to PATH | ||
export PATH="/opt/firebird/bin:/usr/local/bin:${PATH:-}" |
10 changes: 10 additions & 0 deletions
10
templates/trees/deb/flamerobin/usr/local/share/applications/flamerobin.desktop
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,10 @@ | ||
[Desktop Entry] | ||
Name=Flamerobin | ||
GenericName=Database administration tool | ||
Comment=Administration Tool for Firebird DBMS | ||
Exec=/usr/local/bin/flamerobin | ||
Icon=/usr/local/share/pixmaps/flamerobin.png | ||
Type=Application | ||
Terminal=false | ||
Categories=Development;Database;GTK | ||
Keywords=flamerobin,firebird |
21 changes: 21 additions & 0 deletions
21
...es/deb/flamerobin/usr/local/share/flamerobin/code-templates/create_change_trigger.confdef
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,21 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<root> | ||
<node> | ||
<caption>Create change trigger for {%object_name%}</caption> | ||
<setting type="relation_columns" style="list"> | ||
<caption>Which column changes would you like to log?</caption> | ||
<key>{%object_path%}/columnNames</key> | ||
<default>{%foreach:column:, :{%object_name%}%}</default> | ||
<relation>{%object_handle%}</relation> | ||
<aligngroup>1</aligngroup> | ||
<proportion>1</proportion> | ||
</setting> | ||
<setting type="int"> | ||
<caption>Trigger position (0..32767)</caption> | ||
<key>{%object_path%}/triggerPosition</key> | ||
<default>99</default> | ||
<relation>{%object_handle%}</relation> | ||
<aligngroup>1</aligngroup> | ||
</setting> | ||
</node> | ||
</root> |
5 changes: 5 additions & 0 deletions
5
...trees/deb/flamerobin/usr/local/share/flamerobin/code-templates/create_change_trigger.info
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,5 @@ | ||
[templateInfo] | ||
menuCaption=Create change trigger for {%object_name%} | ||
menuPosition=40 | ||
matchesType=^TABLE$ | ||
matchesWhen={%!:{%is_system%}%} |
14 changes: 14 additions & 0 deletions
14
...s/deb/flamerobin/usr/local/share/flamerobin/code-templates/create_change_trigger.template
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,14 @@ | ||
{%--:Uncomment to edit template info visually.%}{%--:{%edit_info%}{%abort%}%}{%edit_conf%}{%kw:set term !! ; | ||
create trigger%} CT_{%object_name%} {%kw:for%} {%object_quoted_name%} | ||
{%kw:active after update position {%getconf:{%object_path%}/triggerPosition:99%} | ||
as | ||
begin | ||
{%tab%}if%} ({%foreach:column: | ||
{%tab%}{%tab%}{%kw:or%} :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}:{%kw:old%}.{%object_quoted_name%} {%kw:is distinct from new%}.{%object_quoted_name%}%}%}) | ||
{%tab%}{%kw:then | ||
{%tab%}begin%} | ||
{%tab%}{%tab%}/* do something */ | ||
{%tab%}{%kw:end | ||
end!! | ||
|
||
set term%} ; !! |
13 changes: 13 additions & 0 deletions
13
...merobin/usr/local/share/flamerobin/code-templates/create_selectable_execute_block.confdef
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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<root> | ||
<node> | ||
<caption>Create selectable block</caption> | ||
<setting type="relation_columns" style="list"> | ||
<caption>Selected columns</caption> | ||
<key>{%object_path%}/columnNames</key> | ||
<default>{%foreach:column:, :{%object_name%}%}</default> | ||
<relation>{%object_handle%}</relation> | ||
<proportion>1</proportion> | ||
</setting> | ||
</node> | ||
</root> |
5 changes: 5 additions & 0 deletions
5
...flamerobin/usr/local/share/flamerobin/code-templates/create_selectable_execute_block.info
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,5 @@ | ||
[templateInfo] | ||
menuCaption=Create selectable EXECUTE BLOCK statement | ||
menuPosition=60 | ||
matchesType=^TABLE$|^VIEW$ | ||
|
20 changes: 20 additions & 0 deletions
20
...erobin/usr/local/share/flamerobin/code-templates/create_selectable_execute_block.template
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 @@ | ||
{%--:Uncomment to edit template info visually.%}{%--:{%edit_info%}{%abort%}%}{%edit_conf%}{%kw:set term !! ; | ||
|
||
execute block | ||
returns%} ( {%foreach:column:, :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}: | ||
{%tab%}{%object_quoted_name%} {%columninfo:source%}%}%} | ||
) | ||
{%kw:as | ||
begin | ||
{%tab%}for select%} {%foreach:column:, :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}: | ||
{%tab%}{%tab%}a.{%object_quoted_name%}%}%} | ||
{%tab%}{%kw:from%} {%object_quoted_name%} a | ||
{%tab%}{%kw:into%} {%foreach:column:, :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}: | ||
{%tab%}{%tab%}{%object_quoted_name%}%}%} | ||
{%tab%}{%kw:do | ||
{%tab%}begin | ||
{%tab%}{%tab%}suspend; | ||
{%tab%}end | ||
end!! | ||
|
||
set term%} ; !! |
13 changes: 13 additions & 0 deletions
13
.../flamerobin/usr/local/share/flamerobin/code-templates/create_selectable_procedure.confdef
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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<root> | ||
<node> | ||
<caption>Create selectable stored procedure</caption> | ||
<setting type="relation_columns" style="list"> | ||
<caption>Selected columns</caption> | ||
<key>{%object_path%}/columnNames</key> | ||
<default>{%foreach:column:, :{%object_name%}%}</default> | ||
<relation>{%object_handle%}</relation> | ||
<proportion>1</proportion> | ||
</setting> | ||
</node> | ||
</root> |
4 changes: 4 additions & 0 deletions
4
...deb/flamerobin/usr/local/share/flamerobin/code-templates/create_selectable_procedure.info
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,4 @@ | ||
[templateInfo] | ||
menuCaption=Create selectable stored procedure | ||
menuPosition=50 | ||
matchesType=^TABLE$|^VIEW$ |
20 changes: 20 additions & 0 deletions
20
...flamerobin/usr/local/share/flamerobin/code-templates/create_selectable_procedure.template
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 @@ | ||
{%--:Uncomment to edit template info visually.%}{%--:{%edit_info%}{%abort%}%}{%edit_conf%}{%kw:set term !! ; | ||
|
||
create procedure%} SP_{%object_name%} | ||
{%kw:returns%} ( {%foreach:column:, :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}: | ||
{%tab%}{%object_quoted_name%} {%columninfo:typeof%}%}%} | ||
) | ||
{%kw:as | ||
begin | ||
{%tab%}for select%} {%foreach:column:, :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}: | ||
{%tab%}{%tab%}a.{%object_quoted_name%}%}%} | ||
{%tab%}{%kw:from%} {%object_quoted_name%} a | ||
{%tab%}{%kw:into%} {%foreach:column:, :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}: | ||
{%tab%}{%tab%}{%object_quoted_name%}%}%} | ||
{%tab%}{%kw:do | ||
{%tab%}begin | ||
{%tab%}{%tab%}suspend; | ||
{%tab%}end | ||
end!! | ||
|
||
set term%} ; !! |
Oops, something went wrong.