mkdir -p /root/rpmbuild/{BUILD,BUILDROOT,RPMS/armv7hl,SPECS}
pkcon install -y rpm-build
/root/rpmbuild/BUILD
/root/rpmbuild/SPECS


su -l nemo -c "command"
Name: myfirstpackage
Version: 0.1
Release: 1
Summary: My First package
Group: System/Tools
Vendor: Schturman
Distribution: SailfisfOS
Packager: Schturman <your@mail.com>
URL: www.yoursite.com
License: GPL
%description
This is my first package of custom Ambience...
%files
%defattr(-,root,root,-)
/usr/share/ambience/*
%post
systemctl-user restart ambienced.service
%postun
if [ $1 = 0 ]; then
#Do stuff specific to uninstalls
rm -rf /usr/share/ambience/myfirstpackage
systemctl-user restart ambienced.service
else
if [ $1 = 1 ]; then
#Do stuff specific to upgrades
echo "It's just upgrade"
systemctl-user restart ambienced.service
fi
fi
%changelog
* Sun Mar 16 2014 Builder <builder@...> 0.1
- First build.
%files /usr/share/applications/openrepos-myfirstpackage.desktop /usr/share/icons/hicolor/86x86/apps/openrepos-myfirstpackage-off.png /usr/share/openrepos-myfirstpackage/*
%defattr(4755,root,root) /usr/share/openrepos-myfirstpackage/myscript.sh /usr/share/openrepos-myfirstpackage/myscript2.sh /usr/share/openrepos-myfirstpackage/myscript-root
%pre
if [ $1 = 1 ]; then
#Do stuff specific for first install
echo "It's first time install"
else
if [ $1 = 2 ]; then
#Do stuff specific to upgrades
echo "It's upgrade"
fi
fi
%post
if [ $1 = 1 ]; then
#Do stuff specific for first install
echo "It's first time install"
else
if [ $1 = 2 ]; then
#Do stuff specific to upgrades
echo "It's upgrade"
fi
fi
%preun
if [ $1 = 0 ]; then
#Do stuff specific for uninstalls
echo "Going to uninstall"
else
if [ $1 = 1 ]; then
#Do stuff specific to upgrades
echo "It's upgrade"
fi
fi
%postun
if [ $1 = 0 ]; then
#Do stuff specific for uninstalls
echo "Going to uninstall"
else
if [ $1 = 1 ]; then
#Do stuff specific to upgrades
echo "It's upgrade"
fi
fi
/bin/cp -rf /root/rpmbuild/BUILD/myfirstpackage-0.1-1.arm /root/rpmbuild/BUILDROOT cd /root/rpmbuild rpmbuild -bb SPECS/myfirstpackage.spec
/bin/cp -f /root/rpmbuild/RPMS/armv7hl/myfirstpackage-0.1-1.armv7hl.rpm /home/nemo/Downloads
pkcon install-local -y /home/nemo/Downloads/myfirstpackage-0.1-1.armv7hl.rpm
pkcon remove myfirstpackage

| The Following 29 Users Say Thank You to Schturman For This Useful Post: | ||
| The Following 3 Users Say Thank You to For This Useful Post: | ||
| The Following User Says Thank You to Schturman For This Useful Post: | ||
| The Following User Says Thank You to Schturman For This Useful Post: | ||

| The Following 2 Users Say Thank You to For This Useful Post: | ||
| The Following 2 Users Say Thank You to Schturman For This Useful Post: | ||
| The Following User Says Thank You to flotron For This Useful Post: | ||
| The Following User Says Thank You to flotron For This Useful Post: | ||
pkcon install -y rpm-build