Compare commits
2 commits
master
...
aurora_os_
Author | SHA1 | Date | |
---|---|---|---|
|
05238eccc8 | ||
|
abf2d1f565 |
3 changed files with 58 additions and 7 deletions
47
build.sh
Executable file
47
build.sh
Executable file
|
@ -0,0 +1,47 @@
|
||||||
|
engine="docker exec -w $(pwd) --user mersdk aurora-os-build-engine"
|
||||||
|
targets=`${engine} sb2-config -l|grep -v default`
|
||||||
|
version=`grep -E "Version" $(pwd)/rpm/harbour-fernschreiber.spec|sed "s/Version: \+//g"`
|
||||||
|
release=`grep -E "Release:" $(pwd)/rpm/harbour-fernschreiber.spec|sed "s/Release: \+//g"`
|
||||||
|
|
||||||
|
for each in key cert; do
|
||||||
|
if [ -f `pwd`/regular_${each}.pem ]; then
|
||||||
|
echo "Found a regular_${each}.pem file: OK"
|
||||||
|
continue;
|
||||||
|
fi
|
||||||
|
echo -n "Downloading regular_${each}.pem for singing RPM for AuroraOS: "
|
||||||
|
curl https://community.omprussia.ru/documentation/files/doc/regular_${each}.pem -o regular_${each}.pem &> /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "OK"
|
||||||
|
else
|
||||||
|
echo "FAIL"
|
||||||
|
echo "Cant download regular_${each}.pem: https://community.omprussia.ru/documentation/files/doc/regular_${each}.pem"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for target in ${targets}; do
|
||||||
|
echo "Build for ${target}"
|
||||||
|
arch=${target##*-}
|
||||||
|
echo "Detected arch: ${arch}"
|
||||||
|
${engine} mb2 -t ${target} build
|
||||||
|
[ $? -ne 0 ] && exit 1
|
||||||
|
package_name="harbour-fernschreiber-${version}-${release}.${arch}.rpm"
|
||||||
|
echo -n "Signing RPM ${package_name}: "
|
||||||
|
temp_output="$(${engine} sb2 -t ${target} rpmsign-external sign --key `pwd`/regular_key.pem --cert `pwd`/regular_cert.pem `pwd`/RPMS/${package_name} 2>&1)"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "FAIL"
|
||||||
|
echo "${temp_output}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "OK"
|
||||||
|
fi
|
||||||
|
echo -n "Validate RPM ${package_name}: "
|
||||||
|
temp_output="$( ${engine} sb2 -t ${target} rpm-validator -p regular `pwd`/RPMS/${package_name} 2>&1 )"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "FAIL"
|
||||||
|
echo "${temp_output}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "OK"
|
||||||
|
fi
|
||||||
|
done
|
|
@ -1,6 +1,6 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
X-Nemo-Application-Type=generic
|
X-Nemo-Application-Type=silica-qt5
|
||||||
Icon=harbour-fernschreiber
|
Icon=harbour-fernschreiber
|
||||||
Exec=harbour-fernschreiber
|
Exec=harbour-fernschreiber
|
||||||
Name=Fernschreiber
|
Name=Fernschreiber
|
||||||
|
|
|
@ -7,7 +7,7 @@ Name: harbour-fernschreiber
|
||||||
|
|
||||||
# >> macros
|
# >> macros
|
||||||
%define __provides_exclude_from ^%{_datadir}/.*$
|
%define __provides_exclude_from ^%{_datadir}/.*$
|
||||||
%define __requires_exclude ^libtdjson.*$
|
%define __requires_exclude ^lib(tdjson|ssl|crypto).*$
|
||||||
# << macros
|
# << macros
|
||||||
|
|
||||||
Summary: Fernschreiber is a Telegram client for Sailfish OS
|
Summary: Fernschreiber is a Telegram client for Sailfish OS
|
||||||
|
@ -57,8 +57,8 @@ make %{?_smp_mflags}
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
# >> install pre
|
# >> install pre
|
||||||
# << install pre
|
# << install pre
|
||||||
%qmake5_install
|
# %qmake5_install
|
||||||
|
make INSTALL_ROOT=%{buildroot} install
|
||||||
# >> install post
|
# >> install post
|
||||||
# << install post
|
# << install post
|
||||||
|
|
||||||
|
@ -68,9 +68,13 @@ desktop-file-install --delete-original \
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}
|
%attr(755,root,root) %{_bindir}/%{name}
|
||||||
%{_datadir}/%{name}
|
%attr(655,root,root) %{_datadir}/%{name}/qml
|
||||||
|
%{_datadir}/%{name}/lib
|
||||||
|
%attr(655,root,root) %{_datadir}/%{name}/images
|
||||||
|
%attr(655,root,root) %{_datadir}/%{name}/db
|
||||||
|
%attr(655,root,root) %{_datadir}/%{name}/translations
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
%attr(644,root,root) %{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||||
# >> files
|
# >> files
|
||||||
# << files
|
# << files
|
||||||
|
|
Loading…
Reference in a new issue