summaryrefslogtreecommitdiff
path: root/packages/README.md
diff options
context:
space:
mode:
authorSébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>2020-10-02 11:33:50 +0200
committerDavid Oberhollenzer <goliath@infraroot.at>2020-10-02 23:00:07 +0200
commitb2070626dc7cb6defd71023495cb6a86f796c7ea (patch)
tree50327983e8b7a31d754cbdd4b97f64ace1c7f0c3 /packages/README.md
parentb06b42406e12fb69678ae1d83a3bc5877484e8ef (diff)
Add README file
Comments from all package files have been relocated into the README file. Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
Diffstat (limited to 'packages/README.md')
-rw-r--r--packages/README.md79
1 files changed, 79 insertions, 0 deletions
diff --git a/packages/README.md b/packages/README.md
new file mode 100644
index 0000000..a883cf0
--- /dev/null
+++ b/packages/README.md
@@ -0,0 +1,79 @@
+# Package builder
+
+This directory contains files to build packages for several Linux
+distributions.
+
+# APK
+
+[APKBUILD]() containts all definition to build APK packages for Alpine
+linux.
+
+From a fresh install setup the build environment for a reqular user
+named `pkg-builder` (user name is up to you):
+
+```
+adduser pkg-builder
+addgroup pkg-builder abuild
+echo '%abuild ALL=(ALL) NOPASSWD:/sbin/apk, /bin/mkdir -p /etc/apk/keys, /bin/cp -i *.pub /etc/apk/keys/' > /etc/sudoers.d/abuild
+chmod 0400 /etc/sudoers.d/abuild
+apk add alpine-sdk
+```
+
+Build the package as `pkg-builder`:
+
+```
+abuild-keygen -nai
+abuild -r
+```
+
+# PKG
+
+[PKGBUILD]() contains all definition to build Archlinux packages.
+
+Run following commands:
+
+```
+sudo pacman -S --noconfirm fakeroot binutils namcap
+makepkg --noconfirm -Cfsir PKGBUILD
+```
+
+You can check the packages using `namcap`:
+
+```
+namcap -i squashfs-tools-*.pkg.tar.zst PKGBUILD
+```
+
+# RPM
+
+[squashfs-tools-ng.spec]() contains all definitions to build RPM
+packages.
+
+## CentOS, Fedora
+
+Run following commands:
+
+```
+yum install -y rpm-build spectool
+rpmdev-setuptree
+spectool -g -R squashfs-tools-ng.spec
+rpmspec --parse squashfs-tools-ng.spec | grep BuildRequires | cut -d' ' -f2 | xargs sudo yum install -y
+rpmbuild --clean -ba squashfs-tools-ng.spec
+```
+
+## OpenSUSE
+
+Run following commands:
+
+```
+zypper install -y rpm-build
+rpmspec --parse squashfs-tools-ng.spec | grep Source0 | awk '{print $2}' | xargs wget -N -P $(rpm --eval '%{_sourcedir}')
+rpmspec --parse squashfs-tools-ng.spec | grep BuildRequires | cut -d' ' -f2 | xargs sudo zypper install -y
+rpmbuild --clean -ba squashfs-tools-ng.spec
+```
+
+Note:
+* `spectool` does not natively exists on OpenSUSE, hence source has to
+ be downloaded manually.
+* `zypper` is used intead of `yum`.
+
+