From b2070626dc7cb6defd71023495cb6a86f796c7ea Mon Sep 17 00:00:00 2001 From: Sébastien Gross Date: Fri, 2 Oct 2020 11:33:50 +0200 Subject: Add README file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comments from all package files have been relocated into the README file. Signed-off-by: Sébastien Gross --- packages/APKBUILD | 10 +----- packages/PKGBUILD | 12 ------- packages/README.md | 79 +++++++++++++++++++++++++++++++++++++++++ packages/squashfs-tools-ng.spec | 21 ----------- 4 files changed, 80 insertions(+), 42 deletions(-) create mode 100644 packages/README.md diff --git a/packages/APKBUILD b/packages/APKBUILD index 03c1f3e..92d95ee 100644 --- a/packages/APKBUILD +++ b/packages/APKBUILD @@ -1,16 +1,8 @@ # -*- sh -*- -# 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 -# -# abuild-keygen -nai -# abuild -r - # Contributor: # Maintainer: Sébastien Gross + pkgname=squashfs-tools-ng pkgver=1.0.2 pkgrel=0 diff --git a/packages/PKGBUILD b/packages/PKGBUILD index d4b2311..38eb9b2 100644 --- a/packages/PKGBUILD +++ b/packages/PKGBUILD @@ -1,17 +1,5 @@ # -*- sh -*- -# Build squashfs-tools-ng for Archlinux. -# -# How to build package for Archlinux: -# -# sudo pacman -S --noconfirm fakeroot binutils -# makepkg --noconfirm -Cfsir PKGBUILD -# -# Check result with -# -# namcap -i squashfs-tools-*.pkg.tar.zst PKGBUILD -# - # Maintainer: Sébastien Gross # Contributor: 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`. + + diff --git a/packages/squashfs-tools-ng.spec b/packages/squashfs-tools-ng.spec index c5a2ea0..d16b66a 100644 --- a/packages/squashfs-tools-ng.spec +++ b/packages/squashfs-tools-ng.spec @@ -1,25 +1,4 @@ ## Spec file to build squashf-tools-ng RPM package. -## -## Install following packages: -## - 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 -## -## Note: tools like yum-builddep does not seem to work when installing -## build requirements. -## -## On OpenSUSE: -## -## * spectool des not exists. Too retrieve the source package: -## -## rpmspec --parse squashfs-tools-ng.spec | grep Source0 | awk '{print $2}' | xargs wget -N -P $(rpm --eval '%{_sourcedir}') -## -## * yum command should also be replaced by zypper. -## -## Run: -## - rpmbuild --clean -ba squashfs-tools-ng.spec -## # OpenSUSE has no dist macro %if 0%{suse_version} > 0 -- cgit v1.2.3