-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vitaliy Zarubin
committed
Nov 4, 2024
1 parent
9fd1bf5
commit ca477c8
Showing
15 changed files
with
257 additions
and
168 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
File renamed without changes.
File renamed without changes
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,38 @@ | ||
## Как собрать rpm пакет локально, на примере спецификации для Ubuntu 24.04 | ||
|
||
Подготовка окружения для сборки: | ||
|
||
```shell | ||
sudo apt-get install gettext, meson, pkg-config, libgjs-dev, libgtk-4-dev, libadwaita-1-dev | ||
``` | ||
|
||
Сборка из корня проекта: | ||
|
||
```shell | ||
chmod +x ./build/run.sh | ||
./build/run.sh | ||
``` | ||
|
||
Собранный пакет можно будет найти: | ||
|
||
`./build/release/debrpm/aurora-toolbox_{version}-{revision}_amd64_.deb` | ||
|
||
## Установка | ||
|
||
Подготовка окружения для установки: | ||
|
||
```shell | ||
sudo apt-get install gjs, language-pack-gnome-ru, language-pack-ru-base, libadwaita-1-0 | ||
``` | ||
|
||
Установка: | ||
|
||
```shell | ||
sudo dpkg -i ./build/release/deb/aurora-toolbox_*.deb | ||
``` | ||
|
||
Удаление: | ||
|
||
```shell | ||
sudo dpkg -r com.keygenqt.aurora-toolbox | ||
``` |
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
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,38 @@ | ||
## Как собрать rpm пакет локально, на примере спецификации для ALT Linux (P11) | ||
|
||
Подготовка окружения для сборки: | ||
|
||
```shell | ||
sudo apt-get install rpm-build meson libgjs-devel libgtk4-devel libadwaita-devel | ||
``` | ||
|
||
Сборка из корня проекта: | ||
|
||
```shell | ||
chmod +x ./build/run.sh | ||
./build/run.sh | ||
``` | ||
|
||
Собранный пакет можно будет найти: | ||
|
||
`./build/release/rpm/aurora-toolbox_{version}-{revision}_x86_64.rpm` | ||
|
||
## Установка | ||
|
||
Подготовка окружения для установки: | ||
|
||
```shell | ||
sudo apt-get install gnome-extensions-app libgjs libgtk4-gir libadwaita-gir libsoup-gir | ||
``` | ||
|
||
Установка: | ||
|
||
```shell | ||
sudo rpm -i ./build/release/rpm/aurora-toolbox_*.rpm | ||
``` | ||
|
||
Удаление: | ||
|
||
```shell | ||
sudo rpm -e aurora-toolbox | ||
``` |
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,102 @@ | ||
#!/bin/bash | ||
|
||
############################### | ||
## Build and create rpm package | ||
############################### | ||
|
||
NAME="$1" | ||
PACKAGE="$2" | ||
REVISION="$3" | ||
FOLDER="$4" | ||
VERSION="$5" | ||
|
||
ARCH="x86_64" | ||
|
||
# Set root dir | ||
DIR="$(dirname "$(realpath "$0")")" | ||
cd $DIR/../../ | ||
|
||
NAME_RPM="$NAME-$VERSION-$REVISION.$ARCH.rpm" | ||
RPM_FOLDER=$HOME/RPM | ||
|
||
# Clear | ||
rm -rf $RPM_FOLDER | ||
|
||
# Create folders | ||
mkdir -p $RPM_FOLDER | ||
mkdir -p $RPM_FOLDER/SPECS | ||
mkdir -p $RPM_FOLDER/SOURCES | ||
|
||
# Copy data | ||
cd $DIR/../../../ | ||
cp -R ./$NAME ./$NAME-$VERSION | ||
tar czf source.tar.gz ./$NAME-$VERSION | ||
mv source.tar.gz $RPM_FOLDER/SOURCES | ||
rm -rf ./$NAME-$VERSION | ||
cd $NAME | ||
|
||
# Create control | ||
tee -a $RPM_FOLDER/SPECS/$NAME.spec > /dev/null <<EOT | ||
%define fullname $PACKAGE | ||
Name: $NAME | ||
Version: $VERSION | ||
Release: $REVISION | ||
Summary: An application that provides an easy start in the Aurora OS ecosystem. | ||
License: Apache-2.0 | ||
Group: Development/Tools | ||
Url: https://github.com/keygenqt/aurora-toolbox | ||
Source: source.tar.gz | ||
BuildRequires: meson | ||
BuildRequires: libgjs-devel | ||
BuildRequires: libgtk4-devel | ||
BuildRequires: libadwaita-devel >= 1.5 | ||
Requires: sudo | ||
Requires: gnome-extensions-app | ||
Requires: libgjs | ||
Requires: libgtk4-gir | ||
Requires: libadwaita-gir | ||
Requires: libsoup-gir | ||
%description | ||
%summary. | ||
%prep | ||
%setup | ||
%build | ||
%meson | ||
%meson_build | ||
%install | ||
%meson_install | ||
mkdir -p %{buildroot}%{_datadir}/applications | ||
mkdir -p %{buildroot}%{_datadir}/icons | ||
install ./build/data/%{fullname}.svg %{buildroot}%{_datadir}/icons/%{fullname}.svg | ||
install ./build/data/%{fullname}.desktop %{buildroot}%{_datadir}/applications/%{fullname}.desktop | ||
%post | ||
ln -sf %{_bindir}/%{fullname} %{_bindir}/%{name} | ||
%files | ||
%doc CHANGELOG.md | ||
%{_bindir}/%{fullname} | ||
%{_datadir}/%{fullname}/%{fullname}.data.gresource | ||
%{_datadir}/%{fullname}/%{fullname}.src.gresource | ||
%{_datadir}/applications/%{fullname}.desktop | ||
%{_datadir}/glib-2.0/schemas/%{fullname}.gschema.xml | ||
%{_datadir}/icons/%{fullname}.svg | ||
%{_datadir}/locale/ru/LC_MESSAGES/%{fullname}.mo | ||
EOT | ||
|
||
# Build | ||
rpmbuild -bb $RPM_FOLDER/SPECS/$NAME.spec | ||
|
||
# Move | ||
rm -rf ./build/$FOLDER/rpm | ||
mkdir -p ./build/$FOLDER/rpm | ||
mv $RPM_FOLDER/RPMS/x86_64/$NAME_RPM ./build/$FOLDER/rpm/$NAME_RPM | ||
rm -rf $RPM_FOLDER |
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,37 @@ | ||
#!/bin/bash | ||
|
||
################# | ||
## Build packages | ||
################# | ||
|
||
read -p "What kind of package build? (deb/rpm)? " choice | ||
case "$choice" in | ||
deb ) echo "Let's start assembling...";; | ||
rpm ) echo "Let's start assembling...";; | ||
* ) echo "Required [deb/rpm]"; exit;; | ||
esac | ||
|
||
NAME='aurora-toolbox' | ||
PACKAGE='com.keygenqt.aurora-toolbox' | ||
REVISION='1' | ||
FOLDER='release' | ||
DIR="$(dirname "$(realpath "$0")")" | ||
VERSION=$(grep -m 1 version $DIR/../meson.build | xargs | sed 's/[,]//g' | sed 's/version: //g') | ||
|
||
# Build deb | ||
if [ "$choice" = "deb" ]; then | ||
sh $DIR/deb/build.sh $NAME $PACKAGE $REVISION $FOLDER $VERSION | ||
fi | ||
|
||
# Build rpm | ||
if [ "$choice" = "rpm" ]; then | ||
sh $DIR/rpm/build.sh $NAME $PACKAGE $REVISION $FOLDER $VERSION | ||
fi | ||
|
||
# DEB Install / Remove | ||
# sudo dpkg -r com.keygenqt.aurora-toolbox | ||
# sudo dpkg -i $DIR/release/deb/*_amd64.deb | ||
|
||
# RPM Install / Remove | ||
# sudo rpm -e aurora-toolbox | ||
# sudo rpm -i $DIR/release/rpm/*_amd64.rpm |
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.