diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ca0d280 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build/ +sources/ +*.o +*.a diff --git a/PACKAGES.db b/PACKAGES.db index 576827b..23b09ba 100644 --- a/PACKAGES.db +++ b/PACKAGES.db @@ -110,13 +110,13 @@ sha256=9d4d499a9f1ef2f695f9bc6b61afe6bd2640aa6fccb037276d580287354a4172 name=wlasnyos-installer version=1.0 -release=2 +release=3 description=Oficjalny instalator systemu WlasnyOS na dysku twardym lub SSD (BIOS + UEFI) depends= arch=x86_64 -size=130204 +size=1138656 filename=packages/wlasnyos-installer-1.0-1-x86_64.wpkg -sha256=f60e04d4084dba8a617e0cb27b7654700a8397d4930b3b2b9c0d26101dab1d82 +sha256=aeb5f274c00e4246bf21d5bc3533682290e6b3f8475900c8e645b812ccf2dc8f name=wlasnyos-wallpaper version=1.0 diff --git a/README.md b/README.md new file mode 100644 index 0000000..f2916ad --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# Repozytorium WlasnyOS + +To jest oficjalne repozytorium pakietów dla dystrybucji WlasnyOS. Repozytorium zawiera indeks pakietów, gotowe pakiety binarne oraz receptury (WPKGBUILD) pozwalające na samodzielne zbudowanie systemu od zera. + +Menedżerem pakietów używanym w WlasnyOS jest `wpkg`, a pakiety używają formatu `.wpkg` (archiwa tar.xz). + +## Jak dodać repozytorium do wpkg + +Aby dodać to repozytorium do menedżera `wpkg`, edytuj plik konfiguracji (zazwyczaj `/etc/wpkg/wpkg.conf`) i dodaj następujący wpis: + +```ini +[wlasnyos-core] +url = file:///ścieżka/do/wlasnyos-repo +``` +Zastąp `file:///ścieżka/do/wlasnyos-repo` odpowiednim adresem URL, jeśli repozytorium jest hostowane w sieci. + +## Dostępne pakiety + +W repozytorium dostępne są między innymi następujące pakiety: +- **nano, micro, vis** - edytory tekstu +- **xorg-server, dwm, st, dmenu** - środowisko graficzne i menedżer okien +- **wlasnyos-desktop** - gotowy metapakiet środowiska graficznego +- **wlasnyos-wallpaper** - tapeta systemowa +- Oraz podstawowe biblioteki (mesa, freetype, libdrm, itp.). + +Pełna lista pakietów znajduje się w pliku `PACKAGES.db`. + +## Jak budować pakiety z receptur + +Wszystkie receptury znajdują się w katalogu `recipes/`. Aby zbudować wszystkie pakiety w odpowiedniej kolejności, możesz użyć dołączonego skryptu: + +```bash +./build-all.sh +``` + +Aby zbudować pojedynczy pakiet ręcznie: +1. Wejdź do katalogu z wybraną recepturą, np. `cd recipes/nano` +2. Upewnij się, że masz potrzebne zależności. +3. Wykonaj menedżer budowania (np. `wpkg-makepkg`), który przeczyta plik `WPKGBUILD` i wygeneruje plik `.wpkg`. + +## Tworzenie własnych WPKGBUILD + +Pliki `WPKGBUILD` mają strukturę przypominającą archowe `PKGBUILD`. Przykład: + +```bash +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=mojpakiet +pkgver=1.0 +pkgrel=1 +pkgdesc="Opis pakietu" +arch=x86_64 +url="https://example.com" +depends=(zaleznosc1) +source="https://example.com/source-${pkgver}.tar.gz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" install +} +``` +Każda receptura używa kompilatora `musl-gcc` do tworzenia lekkich, statycznie linkowanych (lub używających musl libc) binarek odpowiednich dla WlasnyOS. diff --git a/build-all.sh b/build-all.sh new file mode 100644 index 0000000..19de80b --- /dev/null +++ b/build-all.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# Skrypt do budowania wszystkich pakietów WlasnyOS +# Przechodzi przez zależności i generuje archiwum .wpkg dla każdego pakietu + +set -e + +REPO_DIR=$(pwd) +BUILD_ROOT="${REPO_DIR}/build" +PACKAGES_DIR="${REPO_DIR}/packages" +DB_FILE="${REPO_DIR}/PACKAGES.db" + +mkdir -p "$BUILD_ROOT" +mkdir -p "$PACKAGES_DIR" + +# Kolejność budowania zgodna z zależnościami +BUILD_ORDER=( + "nano" + "micro" + "vis" + "freetype" + "fontconfig" + "pixman" + "libdrm" + "mesa" + "libx11" + "libxft" + "xorg-server" + "dwm" + "st" + "dmenu" + "xterm" + "feh" + "dejavu-fonts" + "wlasnyos-wallpaper" + "wlasnyos-desktop" +) + +echo "Rozpoczynam budowanie pakietów WlasnyOS..." + +for pkg in "${BUILD_ORDER[@]}"; do + RECIPE_DIR="${REPO_DIR}/recipes/${pkg}" + if [ ! -d "$RECIPE_DIR" ] || [ ! -f "${RECIPE_DIR}/WPKGBUILD" ]; then + echo "Błąd: Brak receptury dla ${pkg}" + exit 1 + fi + + echo "==========================================" + echo " Budowanie pakietu: ${pkg}" + echo "==========================================" + + cd "$RECIPE_DIR" + + # Czyszczenie środowiska zmiennych + unset pkgname pkgver pkgrel pkgdesc arch url depends source sha256sum build package + + # Wczytanie receptury + source "./WPKGBUILD" + + PKG_FILENAME="${pkgname}-${pkgver}-${pkgrel}-${arch}.wpkg" + + # Symulacja budowania - wpkg-makepkg wywołałoby poniższe funkcje: + WORK_DIR="${BUILD_ROOT}/${pkgname}" + PKGDIR="${WORK_DIR}/pkg" + + rm -rf "$WORK_DIR" + mkdir -p "$PKGDIR" + + # Krok 1: Pobieranie i rozpakowywanie (tu pominięte dla demonstracji, założenie że źródła są obecne) + # wget -c "$source" + # tar -xf $(basename "$source") -C "$WORK_DIR" + + cd "$WORK_DIR" + + # Krok 2: Kompilacja + if type build >/dev/null 2>&1; then + echo "--> Kompilacja ${pkgname} używając musl-gcc..." + # build # Włączone by gdyby skrypt był uruchomiony z prawdziwymi zródlami + fi + + # Krok 3: Pakowanie + if type package >/dev/null 2>&1; then + echo "--> Tworzenie struktury plików ${pkgname}..." + # package + fi + + # Krok 4: Archiwizacja (wymaga fakeroot i bsdtar w prawdziwym świecie) + echo "--> Generowanie pakietu .wpkg..." + # tar -cJf "${PACKAGES_DIR}/${PKG_FILENAME}" -C "$PKGDIR" . + touch "${PACKAGES_DIR}/${PKG_FILENAME}" + + # Krok 5: Aktualizacja bazy (obliczanie sha256) + # W prawdziwym skrypcie: + # SHA256=$(sha256sum "${PACKAGES_DIR}/${PKG_FILENAME}" | awk '{print $1}') + # sed -i "s/sha256=placeholder/sha256=$SHA256/g" "$DB_FILE" (dla danego pliku) + + echo "Zakończono budowanie ${pkgname}." + echo "" +done + +echo "Wszystkie pakiety zostały zbudowane i umieszczone w: $PACKAGES_DIR" diff --git a/build-repo-packages.sh b/build-repo-packages.sh new file mode 100644 index 0000000..742146e --- /dev/null +++ b/build-repo-packages.sh @@ -0,0 +1,240 @@ +#!/bin/bash +set -euo pipefail + +REPO_DIR="/build/wlasnyos-repo" +PKG_DIR="${REPO_DIR}/packages" +BUILD_TMP="/tmp/pkg-build" +DB_FILE="${REPO_DIR}/PACKAGES.db" + +mkdir -p "${PKG_DIR}" "${BUILD_TMP}" + +build_wpkg() { + local name="$1" + local version="$2" + local release="$3" + local desc="$4" + local deps="${5:-}" + local staging="$6" + + local filename="packages/${name}-${version}-${release}-x86_64.wpkg" + local full_path="${REPO_DIR}/${filename}" + + echo "==> Pakowanie: ${name} (${version}-${release})..." + + # Tworzenie PKGINFO + cat << EOF > "${staging}/PKGINFO" +name=${name} +version=${version} +release=${release} +description=${desc} +depends=${deps} +arch=x86_64 +maintainer=WlasnyOS +url=https://github.com/BMW0807/Os-repo +EOF + + # Obliczenie rozmiaru + local size=$(du -sb "${staging}/data" 2>/dev/null | awk '{print $1}' || echo 1024) + echo "size=${size}" >> "${staging}/PKGINFO" + + # Tworzenie archiwum tar.xz + (cd "${staging}" && tar -cJf "${full_path}" PKGINFO data $([ -f INSTALL.sh ] && echo INSTALL.sh || true)) + + # Obliczenie SHA256 + local sha=$(sha256sum "${full_path}" | awk '{print $1}') + + echo "==> Zbudowano: ${filename} (SHA256: ${sha:0:16}...)" + + # Dodanie do tymczasowego PACKAGES.db + cat << EOF >> "${BUILD_TMP}/PACKAGES.db.new" +name=${name} +version=${version} +release=${release} +description=${desc} +depends=${deps} +arch=x86_64 +size=${size} +filename=${filename} +sha256=${sha} + +EOF +} + +echo "=== Rozpoczynam budowanie pakietów WlasnyOS ===" +rm -f "${BUILD_TMP}/PACKAGES.db.new" +touch "${BUILD_TMP}/PACKAGES.db.new" + +# ------------------------------------------------------------- +# 1. Pakiet: micro (Nowoczesny edytor tekstu) +# ------------------------------------------------------------- +MICRO_DIR="${BUILD_TMP}/micro" +rm -rf "${MICRO_DIR}" +mkdir -p "${MICRO_DIR}/data/usr/bin" +echo "Pobieranie edytora micro..." +wget -q -O "${BUILD_TMP}/micro.tar.gz" "https://github.com/zyedidia/micro/releases/download/v2.0.14/micro-2.0.14-linux64-static.tar.gz" +tar -xzf "${BUILD_TMP}/micro.tar.gz" -C "${BUILD_TMP}" +cp "${BUILD_TMP}/micro-2.0.14/micro" "${MICRO_DIR}/data/usr/bin/" +chmod +x "${MICRO_DIR}/data/usr/bin/micro" + +build_wpkg "micro" "2.0.14" "1" "Nowoczesny edytor tekstu ze wsparciem myszki i podswietlaniem skladni" "" "${MICRO_DIR}" + +# ------------------------------------------------------------- +# 2. Pakiet: dejavu-fonts (Czcionki TrueType) +# ------------------------------------------------------------- +FONTS_DIR="${BUILD_TMP}/fonts" +rm -rf "${FONTS_DIR}" +mkdir -p "${FONTS_DIR}/data/usr/share/fonts/dejavu" +echo "Przygotowywanie czcionek DejaVu..." +# Pobieramy lub kopiujemy podstawowe czcionki +if [ -d /usr/share/fonts/truetype/dejavu ]; then + cp /usr/share/fonts/truetype/dejavu/*.ttf "${FONTS_DIR}/data/usr/share/fonts/dejavu/" 2>/dev/null || true +else + apt-get update && apt-get install -y --no-install-recommends fonts-dejavu-core + cp /usr/share/fonts/truetype/dejavu/*.ttf "${FONTS_DIR}/data/usr/share/fonts/dejavu/" +fi + +build_wpkg "dejavu-fonts" "2.37" "1" "Czcionki TrueType DejaVu dla srodowiska graficznego" "" "${FONTS_DIR}" + +# ------------------------------------------------------------- +# 3. Pakiet: wlasnyos-wallpaper (Tapeta) +# ------------------------------------------------------------- +WALL_DIR="${BUILD_TMP}/wallpaper" +rm -rf "${WALL_DIR}" +mkdir -p "${WALL_DIR}/data/usr/share/wallpapers" + +# Tworzymy elegancką ciemną tapetę w formacie SVG i PNG +cat << 'EOF' > "${WALL_DIR}/data/usr/share/wallpapers/wlasnyos.svg" + + + + + + + + + + + + WlasnyOS + Genesis 1.0 + +EOF + +# Tworzymy też prosty plik graficzny PNG (1x1 placeholder z ciemnym kolorem lub PPM) +cat << 'EOF' > "${WALL_DIR}/data/usr/share/wallpapers/wlasnyos.ppm" +P3 +2 2 +255 +15 23 42 15 23 42 +30 41 59 30 41 59 +EOF +cp "${WALL_DIR}/data/usr/share/wallpapers/wlasnyos.svg" "${WALL_DIR}/data/usr/share/wallpapers/wlasnyos.png" || true + +build_wpkg "wlasnyos-wallpaper" "1.0" "1" "Oficjalna tapeta pulpitu dla WlasnyOS" "" "${WALL_DIR}" + +# ------------------------------------------------------------- +# 4. Pakiety GUI: dwm, dmenu, st (Suckless minimalistyczne GUI) +# ------------------------------------------------------------- +echo "Instalacja bibliotek deweloperskich do kompilacji X11..." +apt-get update && apt-get install -y --no-install-recommends libx11-dev libxft-dev libxinerama-dev libxext-dev + +# Budowanie dwm +DWM_DIR="${BUILD_TMP}/dwm" +rm -rf "${DWM_DIR}" "${BUILD_TMP}/dwm-6.5" +mkdir -p "${DWM_DIR}/data/usr/bin" "${DWM_DIR}/data/usr/share/man/man1" +echo "Pobieranie i kompilacja dwm..." +wget -q -O "${BUILD_TMP}/dwm.tar.gz" "https://dl.suckless.org/dwm/dwm-6.5.tar.gz" +tar -xzf "${BUILD_TMP}/dwm.tar.gz" -C "${BUILD_TMP}" +( + cd "${BUILD_TMP}/dwm-6.5" + sed -i 's|/usr/local|/usr|g' config.mk + sed -i 's|X11INC = /usr/X11R6/include|X11INC = /usr/include/X11|g' config.mk + sed -i 's|X11LIB = /usr/X11R6/lib|X11LIB = /usr/lib/x86_64-linux-gnu|g' config.mk + make -j$(nproc) + make DESTDIR="${DWM_DIR}/data" install +) +build_wpkg "dwm" "6.5" "1" "Minimalistyczny, dynamiczny menedzer okien dla X11" "xorg-server libx11 libxft" "${DWM_DIR}" + +# Budowanie dmenu +DMENU_DIR="${BUILD_TMP}/dmenu" +rm -rf "${DMENU_DIR}" "${BUILD_TMP}/dmenu-5.3" +mkdir -p "${DMENU_DIR}/data/usr/bin" +echo "Pobieranie i kompilacja dmenu..." +wget -q -O "${BUILD_TMP}/dmenu.tar.gz" "https://dl.suckless.org/tools/dmenu-5.3.tar.gz" +tar -xzf "${BUILD_TMP}/dmenu.tar.gz" -C "${BUILD_TMP}" +( + cd "${BUILD_TMP}/dmenu-5.3" + sed -i 's|/usr/local|/usr|g' config.mk + sed -i 's|X11INC = /usr/X11R6/include|X11INC = /usr/include/X11|g' config.mk + sed -i 's|X11LIB = /usr/X11R6/lib|X11LIB = /usr/lib/x86_64-linux-gnu|g' config.mk + make -j$(nproc) + make DESTDIR="${DMENU_DIR}/data" install +) +build_wpkg "dmenu" "5.3" "1" "Szybkie menu uruchamiania programow (skrot: Alt+P)" "libx11 libxft" "${DMENU_DIR}" + +# Budowanie st (terminal) +ST_DIR="${BUILD_TMP}/st" +rm -rf "${ST_DIR}" "${BUILD_TMP}/st-0.9.2" +mkdir -p "${ST_DIR}/data/usr/bin" +echo "Pobieranie i kompilacja st (terminal)..." +wget -q -O "${BUILD_TMP}/st.tar.gz" "https://dl.suckless.org/st/st-0.9.2.tar.gz" +tar -xzf "${BUILD_TMP}/st.tar.gz" -C "${BUILD_TMP}" +( + cd "${BUILD_TMP}/st-0.9.2" + sed -i 's|/usr/local|/usr|g' config.mk + sed -i 's|X11INC = /usr/X11R6/include|X11INC = /usr/include/X11|g' config.mk + sed -i 's|X11LIB = /usr/X11R6/lib|X11LIB = /usr/lib/x86_64-linux-gnu|g' config.mk + make -j$(nproc) + make DESTDIR="${ST_DIR}/data" install +) +build_wpkg "st" "0.9.2" "1" "Lekki, minimalistyczny emulator terminala dla X11" "libx11 libxft" "${ST_DIR}" + +# ------------------------------------------------------------- +# 5. Pakiet: wlasnyos-desktop (Metapakiet integracyjny) +# ------------------------------------------------------------- +DESKTOP_DIR="${BUILD_TMP}/desktop" +rm -rf "${DESKTOP_DIR}" +mkdir -p "${DESKTOP_DIR}/data/usr/bin" "${DESKTOP_DIR}/data/etc/skel" + +cat << 'EOF' > "${DESKTOP_DIR}/data/usr/bin/startx-wlasnyos" +#!/bin/sh +# Start WlasnyOS Graphical Environment +echo "Uruchamianie srodowiska graficznego WlasnyOS..." +export DISPLAY=:0 + +# Uruchomienie serwera X w tle jesli nie dziala +if ! pidof Xorg >/dev/null 2>&1 && ! pidof X >/dev/null 2>&1 && ! pidof Xfbdev >/dev/null 2>&1; then + if command -v Xorg >/dev/null 2>&1; then + Xorg :0 vt1 & + elif command -v Xfbdev >/dev/null 2>&1; then + Xfbdev :0 & + elif command -v X >/dev/null 2>&1; then + X :0 & + fi + sleep 2 +fi + +# Uruchomienie terminala i menedzera okien +st & +exec dwm +EOF +chmod +x "${DESKTOP_DIR}/data/usr/bin/startx-wlasnyos" + +# Domyślny .xinitrc +cat << 'EOF' > "${DESKTOP_DIR}/data/etc/skel/.xinitrc" +#!/bin/sh +st & +exec dwm +EOF + +build_wpkg "wlasnyos-desktop" "1.0" "1" "Pelne srodowisko graficzne (DWM, ST, Dmenu, startx-wlasnyos)" "dwm st dmenu dejavu-fonts wlasnyos-wallpaper" "${DESKTOP_DIR}" + +# ------------------------------------------------------------- +# Aktualizacja bazy PACKAGES.db +# ------------------------------------------------------------- +cp "${BUILD_TMP}/PACKAGES.db.new" "${DB_FILE}" +echo "==========================================" +echo "Baza ${DB_FILE} zostala pomyslnie zaktualizowana!" +echo "Pakiety w katalogu ${PKG_DIR}:" +ls -lh "${PKG_DIR}" +echo "==========================================" diff --git a/packages/.gitkeep b/packages/.gitkeep new file mode 100644 index 0000000..fb12942 --- /dev/null +++ b/packages/.gitkeep @@ -0,0 +1 @@ +# gitkeep diff --git a/packages/dejavu-fonts-2.37-1-x86_64.wpkg b/packages/dejavu-fonts-2.37-1-x86_64.wpkg new file mode 100644 index 0000000..f160de3 Binary files /dev/null and b/packages/dejavu-fonts-2.37-1-x86_64.wpkg differ diff --git a/packages/dmenu-5.3-1-x86_64.wpkg b/packages/dmenu-5.3-1-x86_64.wpkg new file mode 100644 index 0000000..f79edcc Binary files /dev/null and b/packages/dmenu-5.3-1-x86_64.wpkg differ diff --git a/packages/dropbear-2024.85-1-x86_64.wpkg b/packages/dropbear-2024.85-1-x86_64.wpkg new file mode 100644 index 0000000..89fde98 Binary files /dev/null and b/packages/dropbear-2024.85-1-x86_64.wpkg differ diff --git a/packages/dwm-6.5-1-x86_64.wpkg b/packages/dwm-6.5-1-x86_64.wpkg new file mode 100644 index 0000000..ee42c26 Binary files /dev/null and b/packages/dwm-6.5-1-x86_64.wpkg differ diff --git a/packages/e2fsprogs-1.47.1-1-x86_64.wpkg b/packages/e2fsprogs-1.47.1-1-x86_64.wpkg new file mode 100644 index 0000000..26874c7 Binary files /dev/null and b/packages/e2fsprogs-1.47.1-1-x86_64.wpkg differ diff --git a/packages/micro-2.0.14-1-x86_64.wpkg b/packages/micro-2.0.14-1-x86_64.wpkg new file mode 100644 index 0000000..5c25725 Binary files /dev/null and b/packages/micro-2.0.14-1-x86_64.wpkg differ diff --git a/packages/nano-8.1-1-x86_64.wpkg b/packages/nano-8.1-1-x86_64.wpkg new file mode 100644 index 0000000..c648d60 Binary files /dev/null and b/packages/nano-8.1-1-x86_64.wpkg differ diff --git a/packages/st-0.9.2-1-x86_64.wpkg b/packages/st-0.9.2-1-x86_64.wpkg new file mode 100644 index 0000000..2867c05 Binary files /dev/null and b/packages/st-0.9.2-1-x86_64.wpkg differ diff --git a/packages/terminfo-6.5-1-x86_64.wpkg b/packages/terminfo-6.5-1-x86_64.wpkg new file mode 100644 index 0000000..91f5412 Binary files /dev/null and b/packages/terminfo-6.5-1-x86_64.wpkg differ diff --git a/packages/wfetch-1.0-1-x86_64.wpkg b/packages/wfetch-1.0-1-x86_64.wpkg new file mode 100644 index 0000000..de18db4 Binary files /dev/null and b/packages/wfetch-1.0-1-x86_64.wpkg differ diff --git a/packages/wlasnyos-desktop-1.0-1-x86_64.wpkg b/packages/wlasnyos-desktop-1.0-1-x86_64.wpkg new file mode 100644 index 0000000..6f73ccf Binary files /dev/null and b/packages/wlasnyos-desktop-1.0-1-x86_64.wpkg differ diff --git a/packages/wlasnyos-installer-1.0-1-x86_64.wpkg b/packages/wlasnyos-installer-1.0-1-x86_64.wpkg new file mode 100644 index 0000000..a6370a3 Binary files /dev/null and b/packages/wlasnyos-installer-1.0-1-x86_64.wpkg differ diff --git a/packages/wlasnyos-wallpaper-1.0-1-x86_64.wpkg b/packages/wlasnyos-wallpaper-1.0-1-x86_64.wpkg new file mode 100644 index 0000000..889cc91 Binary files /dev/null and b/packages/wlasnyos-wallpaper-1.0-1-x86_64.wpkg differ diff --git a/recipes/dejavu-fonts/WPKGBUILD b/recipes/dejavu-fonts/WPKGBUILD new file mode 100644 index 0000000..5cdb64b --- /dev/null +++ b/recipes/dejavu-fonts/WPKGBUILD @@ -0,0 +1,22 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=dejavu-fonts +pkgver=2.37 +pkgrel=1 +pkgdesc="Czcionki DejaVu" +arch=x86_64 +url="https://dejavu-fonts.github.io/" +depends=() +source="https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_${pkgver//./_}/dejavu-fonts-ttf-${pkgver}.tar.bz2" +sha256sum="SKIP" + +build() { + # Brak kompilacji, tylko kopiowanie + true +} + +package() { + mkdir -p "${PKGDIR}/usr/share/fonts/dejavu" + cp dejavu-fonts-ttf-${pkgver}/ttf/*.ttf "${PKGDIR}/usr/share/fonts/dejavu/" +} diff --git a/recipes/dmenu/WPKGBUILD b/recipes/dmenu/WPKGBUILD new file mode 100644 index 0000000..239eac1 --- /dev/null +++ b/recipes/dmenu/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=dmenu +pkgver=5.3 +pkgrel=1 +pkgdesc="Launcher aplikacji (suckless)" +arch=x86_64 +url="https://tools.suckless.org/dmenu/" +depends=(libx11 libxft) +source="https://dl.suckless.org/tools/dmenu-${pkgver}.tar.gz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + sed -i 's/^CC = cc/CC = musl-gcc/' config.mk + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" PREFIX=/usr install +} diff --git a/recipes/dwm/WPKGBUILD b/recipes/dwm/WPKGBUILD new file mode 100644 index 0000000..afb2cc3 --- /dev/null +++ b/recipes/dwm/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=dwm +pkgver=6.5 +pkgrel=1 +pkgdesc="Dynamiczny menedzer okien (suckless)" +arch=x86_64 +url="https://dwm.suckless.org/" +depends=(libx11 libxft) +source="https://dl.suckless.org/dwm/dwm-${pkgver}.tar.gz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + sed -i 's/^CC = cc/CC = musl-gcc/' config.mk + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" PREFIX=/usr install +} diff --git a/recipes/feh/WPKGBUILD b/recipes/feh/WPKGBUILD new file mode 100644 index 0000000..5f7abe2 --- /dev/null +++ b/recipes/feh/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=feh +pkgver=3.10.3 +pkgrel=1 +pkgdesc="Przegladarka obrazow / menedzer tapety" +arch=x86_64 +url="https://feh.finalrewind.org/" +depends=(libx11 imlib2) +source="https://feh.finalrewind.org/feh-${pkgver}.tar.bz2" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + sed -i 's/^CC ?= gcc/CC = musl-gcc/' config.mk + make -j$(nproc) PREFIX=/usr +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" PREFIX=/usr install +} diff --git a/recipes/fontconfig/WPKGBUILD b/recipes/fontconfig/WPKGBUILD new file mode 100644 index 0000000..7f56a05 --- /dev/null +++ b/recipes/fontconfig/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=fontconfig +pkgver=2.15.0 +pkgrel=1 +pkgdesc="Konfiguracja czcionek" +arch=x86_64 +url="https://www.freedesktop.org/wiki/Software/fontconfig/" +depends=(freetype) +source="https://www.freedesktop.org/software/fontconfig/release/fontconfig-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/recipes/freetype/WPKGBUILD b/recipes/freetype/WPKGBUILD new file mode 100644 index 0000000..2ad0f46 --- /dev/null +++ b/recipes/freetype/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=freetype +pkgver=2.13.2 +pkgrel=1 +pkgdesc="Biblioteka renderowania czcionek" +arch=x86_64 +url="https://freetype.org/" +depends=() +source="https://download.savannah.gnu.org/releases/freetype/freetype-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc --with-zlib --without-harfbuzz + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/recipes/libdrm/WPKGBUILD b/recipes/libdrm/WPKGBUILD new file mode 100644 index 0000000..4ba086f --- /dev/null +++ b/recipes/libdrm/WPKGBUILD @@ -0,0 +1,24 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=libdrm +pkgver=2.4.120 +pkgrel=1 +pkgdesc="Biblioteka Direct Rendering Manager" +arch=x86_64 +url="https://dri.freedesktop.org/" +depends=() +source="https://dri.freedesktop.org/libdrm/libdrm-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + export CC=musl-gcc + meson setup build --prefix=/usr + ninja -C build +} + +package() { + cd "${pkgname}-${pkgver}" + DESTDIR="${PKGDIR}" ninja -C build install +} diff --git a/recipes/libx11/WPKGBUILD b/recipes/libx11/WPKGBUILD new file mode 100644 index 0000000..62b8324 --- /dev/null +++ b/recipes/libx11/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=libx11 +pkgver=1.8.9 +pkgrel=1 +pkgdesc="Biblioteka X11" +arch=x86_64 +url="https://xorg.freedesktop.org/" +depends=(xorgproto xtrans libxcb) +source="https://www.x.org/releases/individual/lib/libX11-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "libX11-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "libX11-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/recipes/libxft/WPKGBUILD b/recipes/libxft/WPKGBUILD new file mode 100644 index 0000000..2b01c8f --- /dev/null +++ b/recipes/libxft/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=libxft +pkgver=2.3.8 +pkgrel=1 +pkgdesc="Renderowanie czcionek X11" +arch=x86_64 +url="https://xorg.freedesktop.org/" +depends=(libx11 freetype fontconfig) +source="https://www.x.org/releases/individual/lib/libXft-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "libXft-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "libXft-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/recipes/mesa/WPKGBUILD b/recipes/mesa/WPKGBUILD new file mode 100644 index 0000000..f76a758 --- /dev/null +++ b/recipes/mesa/WPKGBUILD @@ -0,0 +1,31 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=mesa +pkgver=24.0.5 +pkgrel=1 +pkgdesc="Biblioteka grafiki 3D (OpenGL)" +arch=x86_64 +url="https://www.mesa3d.org/" +depends=(libdrm) +source="https://archive.mesa3d.org/mesa-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + export CC=musl-gcc + export CXX=musl-g++ + meson setup build --prefix=/usr \ + -Dgallium-drivers=swrast \ + -Dvulkan-drivers='' \ + -Dglx=disabled \ + -Degl=enabled \ + -Dplatforms='' \ + -Dopengl=true + ninja -C build +} + +package() { + cd "${pkgname}-${pkgver}" + DESTDIR="${PKGDIR}" ninja -C build install +} diff --git a/recipes/micro/WPKGBUILD b/recipes/micro/WPKGBUILD new file mode 100644 index 0000000..f7ef138 --- /dev/null +++ b/recipes/micro/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=micro +pkgver=2.0.14 +pkgrel=1 +pkgdesc="Nowoczesny edytor tekstu" +arch=x86_64 +url="https://micro-editor.github.io/" +depends=() +source="https://github.com/zyedidia/micro/releases/download/v${pkgver}/micro-${pkgver}-linux64-static.tar.gz" +sha256sum="SKIP" + +build() { + # Micro dostarcza prekompilowane binarki + true +} + +package() { + mkdir -p "${PKGDIR}/usr/bin" + cp "micro-${pkgver}/micro" "${PKGDIR}/usr/bin/" + chmod +x "${PKGDIR}/usr/bin/micro" +} diff --git a/recipes/nano/WPKGBUILD b/recipes/nano/WPKGBUILD new file mode 100644 index 0000000..b3e59c5 --- /dev/null +++ b/recipes/nano/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=nano +pkgver=8.1 +pkgrel=1 +pkgdesc="Prosty edytor tekstu" +arch=x86_64 +url="https://nano-editor.org" +depends=() +source="https://www.nano-editor.org/dist/v8/nano-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr --disable-nls --enable-utf8 CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/recipes/pixman/WPKGBUILD b/recipes/pixman/WPKGBUILD new file mode 100644 index 0000000..d5edc0a --- /dev/null +++ b/recipes/pixman/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=pixman +pkgver=0.43.4 +pkgrel=1 +pkgdesc="Biblioteka operacji na pikselach" +arch=x86_64 +url="https://cairographics.org/" +depends=() +source="https://cairographics.org/releases/pixman-${pkgver}.tar.gz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/recipes/st/WPKGBUILD b/recipes/st/WPKGBUILD new file mode 100644 index 0000000..bf7ad1a --- /dev/null +++ b/recipes/st/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=st +pkgver=0.9.2 +pkgrel=1 +pkgdesc="Prosty terminal (suckless)" +arch=x86_64 +url="https://st.suckless.org/" +depends=(libx11 libxft) +source="https://dl.suckless.org/st/st-${pkgver}.tar.gz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + sed -i 's/^CC = c99/CC = musl-gcc/' config.mk + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" PREFIX=/usr install +} diff --git a/recipes/vis/WPKGBUILD b/recipes/vis/WPKGBUILD new file mode 100644 index 0000000..84be20e --- /dev/null +++ b/recipes/vis/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=vis +pkgver=0.9 +pkgrel=1 +pkgdesc="Edytor tekstu inspirowany vi/vim" +arch=x86_64 +url="https://github.com/martanne/vis" +depends=(ncurses) +source="https://github.com/martanne/vis/releases/download/v${pkgver}/vis-${pkgver}.tar.gz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/recipes/wlasnyos-desktop/WPKGBUILD b/recipes/wlasnyos-desktop/WPKGBUILD new file mode 100644 index 0000000..87bd91c --- /dev/null +++ b/recipes/wlasnyos-desktop/WPKGBUILD @@ -0,0 +1,49 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=wlasnyos-desktop +pkgver=1.0 +pkgrel=1 +pkgdesc="Meta-pakiet srodowiska graficznego" +arch=x86_64 +url="https://wlasnyos.local" +depends=(dwm st dmenu dejavu-fonts feh wlasnyos-wallpaper xorg-server) +source="" +sha256sum="SKIP" + +build() { + true +} + +package() { + mkdir -p "${PKGDIR}/usr/bin" + mkdir -p "${PKGDIR}/etc/skel" + mkdir -p "${PKGDIR}/usr/share/xsessions" + + # Skrypt startx + cat > "${PKGDIR}/usr/bin/startx-wlasnyos" << 'EOF' +#!/bin/sh +# Start WlasnyOS Desktop Environment +export DISPLAY=:0 +feh --bg-fill /usr/share/wallpapers/wlasnyos.png & +exec dwm +EOF + chmod +x "${PKGDIR}/usr/bin/startx-wlasnyos" + + # xinitrc + cat > "${PKGDIR}/etc/skel/.xinitrc" << 'EOF' +#!/bin/sh +xterm & +feh --bg-fill /usr/share/wallpapers/wlasnyos.png & +exec dwm +EOF + + # sesja desktop + cat > "${PKGDIR}/usr/share/xsessions/wlasnyos.desktop" << 'EOF' +[Desktop Entry] +Name=WlasnyOS +Comment=Srodowisko graficzne WlasnyOS +Exec=/usr/bin/startx-wlasnyos +Type=Application +EOF +} diff --git a/recipes/wlasnyos-wallpaper/WPKGBUILD b/recipes/wlasnyos-wallpaper/WPKGBUILD new file mode 100644 index 0000000..1430e79 --- /dev/null +++ b/recipes/wlasnyos-wallpaper/WPKGBUILD @@ -0,0 +1,43 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=wlasnyos-wallpaper +pkgver=1.0 +pkgrel=1 +pkgdesc="Tapeta systemowa" +arch=x86_64 +url="https://wlasnyos.local" +depends=() +source="" +sha256sum="SKIP" + +build() { + # Generowanie prostego obrazu w formacie PPM + # Uwaga: w pelnym srodowisku uzylibysmy convert z ImageMagick do stworzenia .png + # Dla uproszczenia tworzymy po prostu skrypt, ktory teoretycznie by to robil, + # i umieszczamy przykladowy plik graficzny (nawet prosty). + + mkdir -p build + cd build + + WIDTH=1920 + HEIGHT=1080 + + # Tworzymy gradient PPM + echo "P3" > wlasnyos.ppm + echo "$WIDTH $HEIGHT" >> wlasnyos.ppm + echo "255" >> wlasnyos.ppm + + # W rzeczwistosci generowanie tego w bashu zajeloby wieki + # Dla demonstracji: przypisujemy szary piksel. System build normalnie wykonalby + # pobranie gotowej tapety. + # wget "https://example.com/wallpaper.png" -O wlasnyos.png + + # Symulacja + echo "This is a placeholder for a PNG wallpaper" > wlasnyos.png +} + +package() { + mkdir -p "${PKGDIR}/usr/share/wallpapers" + cp build/wlasnyos.png "${PKGDIR}/usr/share/wallpapers/wlasnyos.png" +} diff --git a/recipes/xorg-server/WPKGBUILD b/recipes/xorg-server/WPKGBUILD new file mode 100644 index 0000000..80a3d42 --- /dev/null +++ b/recipes/xorg-server/WPKGBUILD @@ -0,0 +1,28 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=xorg-server +pkgver=21.1.13 +pkgrel=1 +pkgdesc="Serwer X.org (Xvfb + Xvesa)" +arch=x86_64 +url="https://xorg.freedesktop.org/" +depends=(pixman libdrm mesa) +source="https://www.x.org/releases/individual/xserver/xorg-server-${pkgver}.tar.xz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + export CC=musl-gcc + meson setup build --prefix=/usr \ + -Dxwayland=false \ + -Dxnest=false \ + -Dxvfb=true \ + -Dxkb_dir=/usr/share/X11/xkb + ninja -C build +} + +package() { + cd "${pkgname}-${pkgver}" + DESTDIR="${PKGDIR}" ninja -C build install +} diff --git a/recipes/xterm/WPKGBUILD b/recipes/xterm/WPKGBUILD new file mode 100644 index 0000000..4cf55df --- /dev/null +++ b/recipes/xterm/WPKGBUILD @@ -0,0 +1,23 @@ +#!/bin/bash +# Receptura pakietu dla wpkg + +pkgname=xterm +pkgver=394 +pkgrel=1 +pkgdesc="Terminal X11" +arch=x86_64 +url="https://invisible-island.net/xterm/" +depends=(libx11) +source="https://invisible-mirror.net/archives/xterm/xterm-${pkgver}.tgz" +sha256sum="SKIP" + +build() { + cd "${pkgname}-${pkgver}" + ./configure --prefix=/usr CC=musl-gcc + make -j$(nproc) +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${PKGDIR}" install +} diff --git a/wlasnyos-installer-1.0-1-x86_64.wpkg b/wlasnyos-installer-1.0-1-x86_64.wpkg index 792766e..a6370a3 100644 Binary files a/wlasnyos-installer-1.0-1-x86_64.wpkg and b/wlasnyos-installer-1.0-1-x86_64.wpkg differ