Compare commits
1 Commits
ca7be6a025
...
27169ee4cd
| Author | SHA1 | Date | |
|---|---|---|---|
| 27169ee4cd |
@ -11,8 +11,71 @@ ln /pkg/gnu/7z/bin/7zz /pkg/gnu/7z/bin/7z
|
|||||||
```
|
```
|
||||||
|
|
||||||
``` sh *** config ***
|
``` sh *** config ***
|
||||||
|
cat > /pkg/gnu/7z/bin/unzip <<'EOF'
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TARGET_DIR=""
|
||||||
|
QUIET=0
|
||||||
|
TARBALL=""
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
-d)
|
||||||
|
TARGET_DIR="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-q)
|
||||||
|
QUIET=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-t)
|
||||||
|
7z t "$2" >/dev/null 2>&1
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
7z l "$2"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
TARBALL="$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$TARBALL" ]; then
|
||||||
|
echo "unzip wrapper: no archive specified" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$TARGET_DIR" ]; then
|
||||||
|
mkdir -p "$TARGET_DIR"
|
||||||
|
if [ $QUIET -eq 1 ]; then
|
||||||
|
7z x -y -bso0 -bsp0 -o"$TARGET_DIR" "$TARBALL" >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
7z x -y -o"$TARGET_DIR" "$TARBALL"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ $QUIET -eq 1 ]; then
|
||||||
|
7z x -y -bso0 -bsp0 "$TARBALL" >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
7z x -y "$TARBALL"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x /pkg/gnu/7z/bin/unzip
|
||||||
|
```
|
||||||
|
|
||||||
cat > /pkg/gnu/7z/bin/unzip <<EOF
|
cat > /pkg/gnu/7z/bin/unzip <<EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
7z x "$@"
|
7z x "$@"
|
||||||
```
|
|
||||||
|
|||||||
@ -6,3 +6,7 @@ https://root-kit.ru/AeroLinux/AeroPkg.git
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
./install.sh
|
./install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
``` sh *** config ***
|
||||||
|
id aeropkg &>/dev/null || useradd -m -s /bin/bash aeropkg
|
||||||
|
```
|
||||||
|
|||||||
@ -12,5 +12,7 @@ s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
|||||||
|
|
||||||
``` sh *** off ***
|
``` sh *** off ***
|
||||||
pkgname_flat=${pkgname//\//\~}
|
pkgname_flat=${pkgname//\//\~}
|
||||||
|
pkgname_flat=${pkgname_flat%\~s6}
|
||||||
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||||
|
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||||
```
|
```
|
||||||
|
|||||||
14
assets/var/gnu/icu.md
Normal file
14
assets/var/gnu/icu.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
icu
|
||||||
|
=
|
||||||
|
https://github.com/unicode-org/icu/archive/refs/tags/release-78.3.tar.gz
|
||||||
|
|
||||||
|
``` sh *** build ***
|
||||||
|
cd icu4c/source
|
||||||
|
./configure --prefix="$pkgpath" \
|
||||||
|
--enable-shared \
|
||||||
|
--enable-static \
|
||||||
|
--disable-samples \
|
||||||
|
--disable-tests
|
||||||
|
make -j"$(nproc)"
|
||||||
|
make install
|
||||||
|
```
|
||||||
0
assets/var/gnu/libreoffice.md
Normal file
0
assets/var/gnu/libreoffice.md
Normal file
36
assets/var/gnu/libreoffice/core.md
Normal file
36
assets/var/gnu/libreoffice/core.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
libreoffice/core
|
||||||
|
=
|
||||||
|
https://github.com/LibreOffice/core.git
|
||||||
|
|
||||||
|
``` sh *** build ***
|
||||||
|
/pkg/gnu/perl/bin/cpan Archive::Zip
|
||||||
|
pkg enable openjdk17 2>/dev/null || true
|
||||||
|
/pkg/gnu/python3/bin/pip3 install --root-user-action=ignore meson
|
||||||
|
|
||||||
|
echo "--with-parallelism=$(nproc)" >> autogen.input
|
||||||
|
echo "--prefix=$pkgpath" >> autogen.input
|
||||||
|
|
||||||
|
rm -f /pkg/gnu/libreoffice/core/src/autogen.lastrun
|
||||||
|
chown -R aeropkg:aeropkg /pkg/gnu/libreoffice/core
|
||||||
|
mkdir -p /pkg/gnu/libreoffice/core
|
||||||
|
chown -R aeropkg:aeropkg /pkg/gnu/libreoffice/core
|
||||||
|
chmod -R o+rX /pkg/gnu/nss /pkg/gnu/nspr /pkg/gnu/python3 /pkg/gnu/perl
|
||||||
|
|
||||||
|
su -m aeropkg -c "
|
||||||
|
cd /pkg/gnu/libreoffice/core/src
|
||||||
|
./autogen.sh
|
||||||
|
"
|
||||||
|
|
||||||
|
su -m aeropkg -c "
|
||||||
|
cd /pkg/gnu/libreoffice/core/src
|
||||||
|
make
|
||||||
|
"
|
||||||
|
|
||||||
|
cd /pkg/gnu/libreoffice/core/src
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
``` cfg *** build deps ***
|
||||||
|
icu
|
||||||
|
```
|
||||||
|
|
||||||
91
assets/var/gnu/libreoffice/core/.pkgdata.patch/autogen.input
Normal file
91
assets/var/gnu/libreoffice/core/.pkgdata.patch/autogen.input
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
--with-system-icu
|
||||||
|
--enable-release-build
|
||||||
|
--enable-optimized
|
||||||
|
|
||||||
|
# ===== Только headless, без GUI =====
|
||||||
|
--disable-gui
|
||||||
|
--disable-gtk3
|
||||||
|
--disable-qt5
|
||||||
|
--disable-qt6
|
||||||
|
--disable-kf5
|
||||||
|
--disable-kf6
|
||||||
|
--disable-cairo-canvas
|
||||||
|
--disable-dbus
|
||||||
|
--disable-avahi
|
||||||
|
--disable-sdremote
|
||||||
|
--disable-sdremote-bluetooth
|
||||||
|
--disable-gstreamer-1-0
|
||||||
|
--disable-dconf
|
||||||
|
--disable-avmedia
|
||||||
|
|
||||||
|
# ===== Без языков программирования =====
|
||||||
|
--without-java
|
||||||
|
--without-dotnet
|
||||||
|
#--disable-scripting # Work in progress, опции пока не поддерживаются адекватно
|
||||||
|
#--disable-scripting-beanshell
|
||||||
|
#--disable-scripting-javascript
|
||||||
|
--enable-python=system
|
||||||
|
|
||||||
|
# ===== Без баз данных =====
|
||||||
|
#--disable-database-connectivity #work in progress пока не работает
|
||||||
|
--disable-postgresql-sdbc
|
||||||
|
--disable-mariadb-sdbc
|
||||||
|
--disable-firebird-sdbc
|
||||||
|
--disable-report-builder
|
||||||
|
--disable-coinmp
|
||||||
|
|
||||||
|
# ===== Без расширений и SDK =====
|
||||||
|
--disable-odk
|
||||||
|
#--disable-extensions # Work in progress, пока не собирается с ней
|
||||||
|
--disable-extension-integration
|
||||||
|
--disable-extension-update
|
||||||
|
--disable-epm
|
||||||
|
|
||||||
|
# ===== Без отладки и crash-репортов =====
|
||||||
|
--disable-breakpad
|
||||||
|
--disable-crashdump
|
||||||
|
--disable-fuzzers
|
||||||
|
--disable-cve-tests
|
||||||
|
--disable-nan-tests
|
||||||
|
|
||||||
|
# ===== Без онлайн-функций =====
|
||||||
|
--disable-online-update
|
||||||
|
--disable-online-update-mar
|
||||||
|
--without-webdav
|
||||||
|
--disable-ldap
|
||||||
|
--disable-opencl
|
||||||
|
--disable-opengl
|
||||||
|
--disable-skia
|
||||||
|
|
||||||
|
# ===== Без Kerberos/GSSAPI =====
|
||||||
|
--without-krb5
|
||||||
|
--without-gssapi
|
||||||
|
|
||||||
|
# ===== Без документации и шрифтов =====
|
||||||
|
--without-helppack-integration
|
||||||
|
--without-help
|
||||||
|
--without-fonts
|
||||||
|
--without-myspell-dicts
|
||||||
|
--with-templates=no
|
||||||
|
--with-galleries=no
|
||||||
|
|
||||||
|
# ===== Минимальные темы (или вообще без тем) =====
|
||||||
|
--with-theme=no
|
||||||
|
|
||||||
|
# ===== Без лишних библиотек =====
|
||||||
|
--disable-zxing
|
||||||
|
--disable-gpgmepp
|
||||||
|
--disable-lotuswordpro
|
||||||
|
--disable-librelogo
|
||||||
|
--disable-poppler
|
||||||
|
--disable-pdfimport
|
||||||
|
|
||||||
|
# ===== Только английский =====
|
||||||
|
--with-lang=en-US
|
||||||
|
|
||||||
|
# ===== Без пакетов =====
|
||||||
|
--without-package-format
|
||||||
|
|
||||||
|
# ===== Ускорение сборки =====
|
||||||
|
--disable-dependency-tracking
|
||||||
|
--disable-pch
|
||||||
3
assets/var/gnu/libreoffice/cups.md
Normal file
3
assets/var/gnu/libreoffice/cups.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
libreoffice/cups
|
||||||
|
=
|
||||||
|
|
||||||
23
assets/var/gnu/libreoffice/cups/.pkgdata/lib/cups/filter/office-to-pdf
Executable file
23
assets/var/gnu/libreoffice/cups/.pkgdata/lib/cups/filter/office-to-pdf
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Универсальный фильтр CUPS для конвертации офисных документов в PDF через LibreOffice
|
||||||
|
|
||||||
|
LO_BIN="/pkg/gnu/libreoffice/core/lib/libreoffice/program/soffice"
|
||||||
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
|
||||||
|
INPUT_FILE="$6"
|
||||||
|
OUTPUT_FILE="$TEMP_DIR/output.pdf"
|
||||||
|
|
||||||
|
# Конвертация в PDF. LibreOffice сам определит формат по содержимому файла.
|
||||||
|
# Для электронных таблиц (xls/ods) иногда полезно явно указать фильтр,
|
||||||
|
# но обычно --convert-to pdf работает автоматически и корректно.
|
||||||
|
"$LO_BIN" --headless --invisible --convert-to pdf --outdir "$TEMP_DIR" "$INPUT_FILE" > /dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -f "$OUTPUT_FILE" ]; then
|
||||||
|
cat "$OUTPUT_FILE"
|
||||||
|
rm -rf "$TEMP_DIR"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "ERROR: LibreOffice conversion failed for $INPUT_FILE" >&2
|
||||||
|
rm -rf "$TEMP_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
# Форматы Microsoft Office
|
||||||
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document application/pdf 100 office-to-pdf
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet application/pdf 100 office-to-pdf
|
||||||
|
application/vnd.ms-word application/pdf 100 office-to-pdf
|
||||||
|
application/vnd.ms-excel application/pdf 100 office-to-pdf
|
||||||
|
|
||||||
|
# Форматы OpenDocument (ODF)
|
||||||
|
application/vnd.oasis.opendocument.text application/pdf 100 office-to-pdf
|
||||||
|
application/vnd.oasis.opendocument.spreadsheet application/pdf 100 office-to-pdf
|
||||||
|
application/vnd.oasis.opendocument.presentation application/pdf 100 office-to-pdf
|
||||||
|
|
||||||
|
# Текстовые и другие форматы
|
||||||
|
application/rtf application/pdf 100 office-to-pdf
|
||||||
|
text/csv application/pdf 100 office-to-pdf
|
||||||
@ -12,5 +12,7 @@ s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
|||||||
|
|
||||||
``` sh *** off ***
|
``` sh *** off ***
|
||||||
pkgname_flat=${pkgname//\//\~}
|
pkgname_flat=${pkgname//\//\~}
|
||||||
|
pkgname_flat=${pkgname_flat%\~s6}
|
||||||
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||||
|
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||||
```
|
```
|
||||||
|
|||||||
@ -11,6 +11,37 @@ cp -aL dist/*/lib/* lib/nss
|
|||||||
cp -aL dist/public/nss/* include/nss/
|
cp -aL dist/public/nss/* include/nss/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
``` sh *** config ***
|
||||||
|
mkdir -p lib/pkgconfig
|
||||||
|
cat > lib/pkgconfig/nss.pc <<'EOF'
|
||||||
|
prefix=/pkg/gnu/nss
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib/nss
|
||||||
|
includedir=${prefix}/include/nss
|
||||||
|
|
||||||
|
Name: NSS
|
||||||
|
Description: Network Security Services
|
||||||
|
Version: 3.126
|
||||||
|
Requires: nspr >= 4.8
|
||||||
|
Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lnssutil3
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > lib/pkgconfig/nss-util.pc <<'EOF'
|
||||||
|
prefix=/pkg/gnu/nss
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib/nss
|
||||||
|
includedir=${prefix}/include/nss
|
||||||
|
|
||||||
|
Name: NSS-Util
|
||||||
|
Description: Network Security Services Utility Library
|
||||||
|
Version: 3.126
|
||||||
|
Requires: nspr >= 4.8
|
||||||
|
Libs: -L${libdir} -lnssutil3
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
``` cfg *** build deps ***
|
``` cfg *** build deps ***
|
||||||
nspr
|
nspr
|
||||||
```
|
```
|
||||||
|
|||||||
@ -12,5 +12,7 @@ s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
|||||||
|
|
||||||
``` sh *** off ***
|
``` sh *** off ***
|
||||||
pkgname_flat=${pkgname//\//\~}
|
pkgname_flat=${pkgname//\//\~}
|
||||||
|
pkgname_flat=${pkgname_flat%\~s6}
|
||||||
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||||
|
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||||
```
|
```
|
||||||
|
|||||||
@ -12,5 +12,7 @@ s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
|||||||
|
|
||||||
``` sh *** off ***
|
``` sh *** off ***
|
||||||
pkgname_flat=${pkgname//\//\~}
|
pkgname_flat=${pkgname//\//\~}
|
||||||
|
pkgname_flat=${pkgname_flat%\~s6}
|
||||||
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||||
|
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||||
```
|
```
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
scan
|
||||||
|
=
|
||||||
|
|
||||||
|
``` config
|
||||||
|
python -m venv venv
|
||||||
|
venv/bin/pip install fastapi "uvicorn[standard]" python-multipart
|
||||||
|
```
|
||||||
|
|||||||
@ -16,6 +16,6 @@ pip install einops scikit-image opencv-python-headless tqdm
|
|||||||
|
|
||||||
``` sh *** upload_weights ***
|
``` sh *** upload_weights ***
|
||||||
mkdir -p data/weights
|
mkdir -p data/weights
|
||||||
#rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
rsync -avz ~/Downloads/mbd.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights/
|
||||||
#rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights
|
rsync -avz ~/Downloads/docres.pkl a:/pkg/gnu/unitprint/backend/scan/DocRes/data/weights/
|
||||||
```
|
```
|
||||||
|
|||||||
18
assets/var/gnu/unitprint/backend/scan/s6.md
Normal file
18
assets/var/gnu/unitprint/backend/scan/s6.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<pkgname>/s6
|
||||||
|
=
|
||||||
|
|
||||||
|
|
||||||
|
``` sh *** set ***
|
||||||
|
pkgname_flat=${pkgname//\//\~}
|
||||||
|
pkgname_flat=${pkgname_flat%\~s6}
|
||||||
|
rm -f /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||||
|
ln -sf $(pwd) /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||||
|
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||||
|
```
|
||||||
|
|
||||||
|
``` sh *** off ***
|
||||||
|
pkgname_flat=${pkgname//\//\~}
|
||||||
|
pkgname_flat=${pkgname_flat%\~s6}
|
||||||
|
rm /pkg/gnu/s6/etc/service/current/$pkgname_flat
|
||||||
|
s6-svscanctl -h /pkg/gnu/s6/etc/service/current
|
||||||
|
```
|
||||||
3
assets/var/gnu/unitprint/backend/scan/s6/.pkgdata/run
Executable file
3
assets/var/gnu/unitprint/backend/scan/s6/.pkgdata/run
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/pkg/gnu/bin/zsh
|
||||||
|
|
||||||
|
/pkg/gnu/unitprint/backend/scan/venv/bin/python /pkg/gnu/unitprint/backend/scan/api.py
|
||||||
@ -1,6 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name local.unitprint.ru unitprint.ru 192.168.1.129;
|
server_name unitprint.ru www.unitprint.ru 192.168.1.129;
|
||||||
|
|
||||||
access_log /pkg/gnu/unitprint/nginx/run/unitprint.access.log;
|
access_log /pkg/gnu/unitprint/nginx/run/unitprint.access.log;
|
||||||
error_log /pkg/gnu/unitprint/nginx/run/unitprint.error.log;
|
error_log /pkg/gnu/unitprint/nginx/run/unitprint.error.log;
|
||||||
@ -12,6 +12,22 @@ server {
|
|||||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||||
gzip_min_length 1000;
|
gzip_min_length 1000;
|
||||||
|
|
||||||
|
location /api/scan/ {
|
||||||
|
proxy_pass http://127.0.0.1:15200/;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
client_max_body_size 50M;
|
||||||
|
|
||||||
|
proxy_read_timeout 300s;
|
||||||
|
proxy_send_timeout 300s;
|
||||||
|
proxy_connect_timeout 300s;
|
||||||
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://127.0.0.1:3000/;
|
proxy_pass http://127.0.0.1:3000/;
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,12 @@ ssh://git@root-kit.ru:17458/UnitPrint/web-app.git
|
|||||||
save_source
|
save_source
|
||||||
```
|
```
|
||||||
|
|
||||||
|
``` sh *** patch ***
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
``` sh *** build ***
|
``` sh *** build ***
|
||||||
git pull
|
git pull || true
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
rm -rf ../dist
|
rm -rf ../dist
|
||||||
@ -15,9 +19,11 @@ cp -rPl dist ..
|
|||||||
```
|
```
|
||||||
|
|
||||||
``` sh *** config ***
|
``` sh *** config ***
|
||||||
|
rm -f src/.aeropkg.applied-build
|
||||||
rm -f build-script.md
|
rm -f build-script.md
|
||||||
chmod o+x /pkg/gnu/unitprint
|
chmod o+x /pkg/gnu/unitprint
|
||||||
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist
|
chown -R nginx:nginx /pkg/gnu/unitprint/web-app/dist
|
||||||
|
nginx -s reload
|
||||||
```
|
```
|
||||||
|
|
||||||
``` sh *** init ***
|
``` sh *** init ***
|
||||||
|
|||||||
4
dev.sh
4
dev.sh
@ -22,8 +22,8 @@ cp -f "$SCRIPT_DIR/target/release/pkg" "$SCRIPT_DIR/target/release/bin"
|
|||||||
echo "Installing to '$INSTALL_PATH'..."
|
echo "Installing to '$INSTALL_PATH'..."
|
||||||
rsync -a --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" "$INSTALL_PATH/"
|
rsync -a --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" "$INSTALL_PATH/"
|
||||||
PATH="/bin:/pkg/musl/bin:/pkg/musl/sbin:/pkg/gnu/bin:/pkg/gnu/sbin" chroot /mnt/aerolinux /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
PATH="/bin:/pkg/musl/bin:/pkg/musl/sbin:/pkg/gnu/bin:/pkg/gnu/sbin" chroot /mnt/aerolinux /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
||||||
rsync -a --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" air:"$INSTALL_PATH/"
|
#rsync -a --exclude='etc/' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" air:"$INSTALL_PATH/"
|
||||||
ssh air /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
#ssh air /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
||||||
rsync -a --exclude='etc/index-conflict.md' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" aura:"$INSTALL_PATH/"
|
rsync -a --exclude='etc/index-conflict.md' "$SCRIPT_DIR/assets/" "$SCRIPT_DIR/target/release/bin" aura:"$INSTALL_PATH/"
|
||||||
ssh aura /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
ssh aura /pkg/gnu/aeropkg/bin/pkg link aeropkg
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,7 @@ pub fn install(repo: &String, pkgname: &String) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
config(repo, pkgname);
|
config(repo, pkgname);
|
||||||
|
if !pkg_dir.join("disabled").exists() { link(repo, pkgname) }
|
||||||
let full_env = &get_custom_env(repo, pkgname, pkg_md_path);
|
let full_env = &get_custom_env(repo, pkgname, pkg_md_path);
|
||||||
shell::run_install_repo_hook_script(repo, full_env);
|
shell::run_install_repo_hook_script(repo, full_env);
|
||||||
shell::run_install_hook_script(full_env);
|
shell::run_install_hook_script(full_env);
|
||||||
|
|||||||
@ -19,21 +19,27 @@ pub fn download(repo: &String, pkgname: &String) {
|
|||||||
let pkgpath = &crate::commands::get_aeropkg_base().join(repo).join(pkgname);
|
let pkgpath = &crate::commands::get_aeropkg_base().join(repo).join(pkgname);
|
||||||
fs::create_dir_all(&pkgpath).ok();
|
fs::create_dir_all(&pkgpath).ok();
|
||||||
|
|
||||||
|
let pkgdata = crate::commands::get_aeropkg_var().join(repo).join(pkgname).join(".pkgdata.patch");
|
||||||
|
|
||||||
|
|
||||||
let src = pkgpath.join("src");
|
let src = pkgpath.join("src");
|
||||||
if src.exists() {
|
if src.exists() {
|
||||||
let src_url = fs::read_to_string(src.join(".aeropkg.download-url")).unwrap_or("".to_string());
|
let src_url = fs::read_to_string(src.join(".aeropkg.download-url")).unwrap_or("".to_string());
|
||||||
|
if pkgdata.exists() {
|
||||||
|
let status = Command::new("cp").args(["-rPlf", &format!("{}/.", pkgdata.to_string_lossy()), &src.to_string_lossy()]).status();
|
||||||
|
if let Err(e) = status { eprintln!("Warning: failed to copy .pkgdata for {}/{}: {}", repo, pkgname, e) }
|
||||||
|
}
|
||||||
if url == src_url { return }
|
if url == src_url { return }
|
||||||
else {
|
else {
|
||||||
fs::remove_dir_all(&src).unwrap()
|
fs::remove_dir_all(&src).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let pkgdata = crate::commands::get_aeropkg_var().join(repo).join(pkgname).join(".pkgdata.patch");
|
|
||||||
if pkgdata.exists() {
|
if pkgdata.exists() {
|
||||||
let status = Command::new("cp").args(["-rPlf", &format!("{}/.", pkgdata.to_string_lossy()), &src.to_string_lossy()]).status();
|
let status = Command::new("cp").args(["-rPlf", &format!("{}/.", pkgdata.to_string_lossy()), &src.to_string_lossy()]).status();
|
||||||
if let Err(e) = status { eprintln!("Warning: failed to copy .pkgdata for {}/{}: {}", repo, pkgname, e) }
|
if let Err(e) = status { eprintln!("Warning: failed to copy .pkgdata for {}/{}: {}", repo, pkgname, e) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let full_env = get_install_env(repo, pkgname, pkg_md_path, "download");
|
let full_env = get_install_env(repo, pkgname, pkg_md_path, "download");
|
||||||
|
|
||||||
if url.ends_with(".git") || url.starts_with("git://") {
|
if url.ends_with(".git") || url.starts_with("git://") {
|
||||||
|
|||||||
Reference in New Issue
Block a user