Commit 13178632 authored by Mikhail Efremov's avatar Mikhail Efremov Committed by Alexey Shabalin

Don't change license and *-release files during update

License can't be changed after update the package from a repository, so don't change these files. Install these files in %post and own them as %ghost %config(noteplace). It this way they are will remain even if the package will be removed.
parent cacee781
...@@ -155,20 +155,33 @@ install: browser-qt ahttpd boot-images boot-splash @X86@ indexhtml hidden-menu-e ...@@ -155,20 +155,33 @@ install: browser-qt ahttpd boot-images boot-splash @X86@ indexhtml hidden-menu-e
#release #release
mkdir -p $(sysconfdir)/buildreqs/packages/ignore.d/ mkdir -p $(sysconfdir)/buildreqs/packages/ignore.d/
install -pD -m644 /dev/null $(sysconfdir)/buildreqs/packages/ignore.d/$(BRAND)-$(THEME)-release install -pD -m644 /dev/null $(sysconfdir)/buildreqs/packages/ignore.d/$(BRAND)-$(THEME)-release
echo "$(PRODUCT_NAME) ($(CODENAME))" >$(sysconfdir)/altlinux-release install -d $(datadir)/branding-data-current
install -pD -m644 systemd/os-release $(datadir)/branding-data-current/release/os-release
echo "$(PRODUCT_NAME) ($(CODENAME))" >$(datadir)/branding-data-current/release/altlinux-release
for n in fedora redhat system; do \ for n in fedora redhat system; do \
ln -s altlinux-release $(sysconfdir)/$$n-release; \ ln -s altlinux-release $(sysconfdir)/$$n-release; \
ln -s altlinux-release $(datadir)/branding-data-current/release/$$n-release; \
done
for r in $(datadir)/branding-data-current/release/*-release; do \
f="$${r##*/}"; \
touch $(sysconfdir)/"$$f"; \
done done
install -pD -m644 systemd/os-release $(sysconfdir)/os-release
#notes #notes
cd notes; \ cd notes; \
install -d $(datadir)/alt-notes; \ install -d $(datadir)/alt-notes; \
cp -a *.html $(datadir)/alt-notes; \ cp -a livecd-*.html $(datadir)/alt-notes; \
cp -a release-notes.*.html $(datadir)/alt-notes; \
for relnotes in release-notes.*.html; do \ for relnotes in release-notes.*.html; do \
suffix="$${relnotes#release-notes.}"; \ suffix="$${relnotes#release-notes.}"; \
ln -s $$relnotes $(datadir)/alt-notes/livecd-finish.$$suffix; \ ln -s $$relnotes $(datadir)/alt-notes/livecd-finish.$$suffix; \
done; \ done; \
install -d $(datadir)/branding-data-current/alt-notes; \
cp -a license.*.html $(datadir)/branding-data-current/alt-notes; \
cd .. cd ..
for r in $(datadir)/branding-data-current/alt-notes/license.*.html; do \
f="$${r##*/}"; \
touch $(datadir)/alt-notes/"$$f"; \
done
#xfce-setting (autostart) #xfce-setting (autostart)
install -Dm 0644 xfce-settings/org.kde.kgpg.desktop $(sysconfdir)/skel/.config/autostart/org.kde.kgpg.desktop install -Dm 0644 xfce-settings/org.kde.kgpg.desktop $(sysconfdir)/skel/.config/autostart/org.kde.kgpg.desktop
install -Dm 0644 xfce-settings/xscreensaver.desktop $(sysconfdir)/skel/.config/autostart/xscreensaver.desktop install -Dm 0644 xfce-settings/xscreensaver.desktop $(sysconfdir)/skel/.config/autostart/xscreensaver.desktop
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
%define design_graphics_abi_minor 0 %define design_graphics_abi_minor 0
%define design_graphics_abi_bugfix 0 %define design_graphics_abi_bugfix 0
%define data_cur_dir %_datadir/branding-data-current
Name: branding-%flavour Name: branding-%flavour
Version: 8.90 Version: 8.90
Release: alt1 Release: alt1
...@@ -386,6 +388,19 @@ subst 's/^#\?icon-theme-name=.*/icon-theme-name=%icon_theme/' /etc/lightdm/light ...@@ -386,6 +388,19 @@ subst 's/^#\?icon-theme-name=.*/icon-theme-name=%icon_theme/' /etc/lightdm/light
subst 's/^#\?theme-name=.*/theme-name=%gtk_theme/' /etc/lightdm/lightdm-gtk-greeter.conf ||: subst 's/^#\?theme-name=.*/theme-name=%gtk_theme/' /etc/lightdm/lightdm-gtk-greeter.conf ||:
subst 's/^#\?icon-theme-name=.*/icon-theme-name=%icon_theme/' /etc/lightdm/lightdm-gtk-greeter.conf ||: subst 's/^#\?icon-theme-name=.*/icon-theme-name=%icon_theme/' /etc/lightdm/lightdm-gtk-greeter.conf ||:
#release
%post release
if ! [ -e %_sysconfdir/altlinux-release ] && \
! [ -e %_sysconfdir/os-release ]; then
cp -a %data_cur_dir/release/*-release %_sysconfdir/
fi
#notes
%post notes
if ! [ -e %_datadir/alt-notes/license.all.html ]; then
cp -a %data_cur_dir/alt-notes/license.*.html %_datadir/alt-notes/
fi
%files alterator %files alterator
%config %_altdir/*.rcc %config %_altdir/*.rcc
/usr/share/alterator-browser-qt/design/*.rcc /usr/share/alterator-browser-qt/design/*.rcc
...@@ -404,11 +419,17 @@ subst 's/^#\?icon-theme-name=.*/icon-theme-name=%icon_theme/' /etc/lightdm/light ...@@ -404,11 +419,17 @@ subst 's/^#\?icon-theme-name=.*/icon-theme-name=%icon_theme/' /etc/lightdm/light
%endif %endif
%files release %files release
%_sysconfdir/*-release %dir %data_cur_dir
%data_cur_dir/release/
%_sysconfdir/buildreqs/packages/ignore.d/* %_sysconfdir/buildreqs/packages/ignore.d/*
%ghost %config(noreplace) %_sysconfdir/*-release
%files notes %files notes
%_datadir/alt-notes/* %dir %data_cur_dir
%data_cur_dir/alt-notes
%_datadir/alt-notes/livecd-*
%_datadir/alt-notes/release-notes.*
%ghost %config(noreplace) %_datadir/alt-notes/license.*.html
%files kde-settings %files kde-settings
/etc/skel/.config/autostart/nm-applet.desktop /etc/skel/.config/autostart/nm-applet.desktop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment