Imported from https://gitlab.com/toomanybicycles/slang-for-sailfish for building at OBS.
Original README below with the formatting fixes.
Get it at OpenRepos
-
install the Platform SDK. Also install the tooling and the target(s) that you need.
-
open the chroot of the SDK:
$ /srv/mer/sdks/sfossdk/mer-sdk-chroot
- enter ScratchBox2 in the target of your preference:
$ sb2 -t SailfishOS-aarch64
$ sb2 -t SailfishOS-armv7hl
$ sb2 -t SailfishOS-i486
- cd to the directory of this repo:
$ cd RPMS/slang/
- enter Scratchbox2 and run rpmbuild for building the "dumb" way:
$ rpmbuild --define "_topdir `pwd`" --define "_sourcedir `pwd`" -bb *.spec
Setting target to i486 instead of i586 for the Jolla Tablet:
$ rpmbuild --define "_topdir `pwd`" --define "_sourcedir `pwd`" --define "_target_cpu i486" -bb *.spec
- enter ScratchBox2 root shell in sdk-install mode for installing packages that are needed to build:
$ sb2 -t SailfishOS-aarch64 -m sdk-install -R
$ sb2 -t SailfishOS-armv7hl -m sdk-install -R
$ sb2 -t SailfishOS-i486 -m sdk-install -R
You can now use zypper to install a package, for example make:
# zypper install make
Or use rpm itself to install a local package
# rpm -Uvh RPMS/armv7hl/packagename.rpm
After installing packages, exit Scratchbox2 and enter Scratchbox2 in the usual way to start the build.