mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2025-07-01 17:23:43 +03:00
chore: make build_{deb,rpm,tarball}.sh reproducible
This commit is contained in:
parent
0feb831865
commit
a92a97f8a3
@ -2,6 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
export SOURCE_DATE_EPOCH=1700000000
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename "$0") [-h] [-a <x64|armv7l|arm64|all> default=x64]"
|
||||
echo
|
||||
@ -35,7 +37,9 @@ build_deb(){
|
||||
# extract tarball to pkgdir
|
||||
tar -xzf "${TEMPDIR}/yandex-music_${version}_${arch}.tar.gz" -C "${pkgdir}"
|
||||
|
||||
dpkg-deb --build "${pkgdir}" "deb/yandex-music_${version}_${pkgarch}.deb"
|
||||
find "${pkgdir}" -exec touch -t "$(date -d "@${SOURCE_DATE_EPOCH}" +%Y%m%d%H%M.%S)" {} +
|
||||
|
||||
dpkg-deb --root-owner-group --build "${pkgdir}" "deb/yandex-music_${version}_${pkgarch}.deb"
|
||||
}
|
||||
|
||||
x64=0
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
export SOURCE_DATE_EPOCH=1700000000
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename "$0") [-h] [-a <x64|armv7l|arm64|all> default=x64]"
|
||||
echo
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
export SOURCE_DATE_EPOCH=1700000000
|
||||
|
||||
usage() {
|
||||
echo "Usage: $(basename "$0") [-h] [-a <x64|armv7l|arm64|all> default=x64]"
|
||||
echo
|
||||
@ -46,7 +48,12 @@ build_tarball(){
|
||||
sed -i "s|%asar_path%|/usr/lib/yandex-music/yandex-music.asar|g" "${app_dir}/usr/bin/yandex-music"
|
||||
|
||||
cd "${app_dir}"
|
||||
tar -czf "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz" *
|
||||
|
||||
find . -print0 | LC_ALL=C sort -z | tar --null --files-from=- \
|
||||
--owner=0 --group=0 --numeric-owner \
|
||||
--mtime="@${SOURCE_DATE_EPOCH}" \
|
||||
-cf - | gzip -n > "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz"
|
||||
|
||||
cd "${INITIAL_DIR}"
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,10 @@ BuildArch: %arch%
|
||||
|
||||
Requires: (kde-cli-tools or kde-cli-tools5 or kde-runtime or trash-cli or glib2 or gvfs-client), (libXtst or libXtst6), (libnotify or libnotify4), (libxcb or libxcb1), (mesa-libgbm or libgbm1), (nss or mozilla-nss), at-spi2-core, gtk3, libdrm, xdg-utils
|
||||
|
||||
%define use_source_date_epoch_as_buildtime 1
|
||||
%define build_mtime_policy clamp_to_source_date_epoch
|
||||
%define buildhost reproducible
|
||||
|
||||
%description
|
||||
Yandex Music - Personal recommendations, selections for any occasion and new music
|
||||
|
||||
@ -18,8 +22,7 @@ Yandex Music - Personal recommendations, selections for any occasion and new mus
|
||||
%setup -q
|
||||
|
||||
%install
|
||||
|
||||
cp -r ./usr %{buildroot}/
|
||||
cp -rp ./usr %{buildroot}/
|
||||
chmod 755 %{buildroot}/usr/bin/yandex-music
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user