Registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.
avatar
mikhailnov has added 55193fbb0c
update plugins cache by filetrigger to update it on installing VLC pl...

...ugins in separate packages, including vlc-plugin-*

view file @ 55193fbb0c
... ... --- /dev/null
... ... +++ b/vlc-plugins.filter
... ... @@ -0,0 +1 @@
1
^.(@LIBDIR@/vlc/plugins/)
view file @ 55193fbb0c
... ... --- /dev/null
... ... +++ b/vlc-plugins.script
... ... @@ -0,0 +1,23 @@
1
#!/bin/sh
2
# https://bugzilla.rosalinux.ru/show_bug.cgi?id=9642
3
# https://bugzilla.rosalinux.ru/show_bug.cgi?id=7420
4
# https://bugs.launchpad.net/1328466
5
run_vlc_cache_gen() {
6
	files=`find @LIBDIR@/vlc/plugins -name '*.so' -type f -print -quit`
7
	if test -n "$files"
8
	then
9
		# run vlc-cache-gen since there are plugins
10
		if ! @LIBDIR@/vlc/vlc-cache-gen @LIBDIR@/vlc/plugins
11
		then
12
			echo "WARNING: Regenerating VLC plugin cache failed."
13
			echo "Please run '@LIBDIR@/vlc/vlc-cache-gen @LIBDIR@/vlc/plugins' manually."
14
		fi
15
	else
16
		# no plugins, so remove plugins.dat
17
		rm -f @LIBDIR@/vlc/plugins/plugins.dat
18
	fi
19
}
20
21
[ -d @LIBDIR@/vlc/plugins ] && \
22
run_vlc_cache_gen
23
... ... --- a/vlc.spec
... ... +++ b/vlc.spec
... ... @@ -43,7 +43,7 @@
43 43
Summary:	MPEG, MPEG2, DVD and DivX player
44 44
Name:		vlc
45 45
Version:	3.0.4
46
Release:	4%{?extrarelsuffix}
46
Release:	5%{?extrarelsuffix}
47 47
#gw the shared libraries are LGPL
48 48
License:	GPLv2+ and LGPLv2+
49 49
Group:		Video
... ... @@ -52,6 +52,8 @@ Source0: http://download.videolan.org/pub/videolan/%{name}/%{version}/%{name}-%{
52 52
Source1:	http://download.videolan.org/pub/videolan/%{name}/%{version}/%{name}-%{version}.tar.xz.asc
53 53
# TODO: Update this one for the new 3.0.4
54 54
Source2:	vlc-2.2.3-ru.po
55
Source10:	vlc-plugins.filter
56
Source11:	vlc-plugins.script
55 57
Patch0:		vlc-3.0.3-automake-1.12.patch
56 58
Patch1:		vlc-3.0.3-fix-default-font.patch
57 59
Patch2:		vlc-2.0.0-desktop-l10n.patch
... ... @@ -668,34 +670,22 @@ This package is in Restricted repository as it is violating software patents.
670 670
%{_iconsdir}/hicolor/*/apps/*
671 671
%{_datadir}/apps/solid/actions/*.desktop
672 672
%{_datadir}/metainfo/vlc.appdata.xml
673
%{_filetriggers_dir}/vlc-plugins.filter
674
%{_filetriggers_dir}/vlc-plugins.script
673 675
674 676
%post
675
#!/bin/sh
676
# https://bugzilla.rosalinux.ru/show_bug.cgi?id=9642
677
# https://bugs.launchpad.net/1328466
678
run_vlc_cache_gen() {
679
	files=`find %{_libdir}/vlc/plugins -name '*.so' -type f -print -quit`
680
	if test -n "$files"
681
	then
682
		# run vlc-cache-gen since there are plugins
683
		if ! %{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins
684
		then
685
			echo "WARNING: Regenerating VLC plugin cache failed."
686
			echo "Please run '%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins' manually."
687
		fi
688
	else
689
		# no plugins, so remove plugins.dat
690
		rm -f %{_libdir}/vlc/plugins/plugins.dat
691
	fi
692
}
693
694
[ -d %{_libdir}/vlc/plugins ] && \
695
run_vlc_cache_gen
677
# (Re-)generate VLC plugins cache not only in RPM filetrigger,
678
# but also here, because RPM filetrigger will not run after 1st installation
679
%{_filetriggers_dir}/vlc-plugins.script
696 680
697 681
%postun
698 682
#!/bin/sh
699 683
# exec if it's a full uninstall, not upgrade
700
[ "$1" = '0' ] && rm -f %{_libdir}/vlc/plugins/plugins.dat
684
# As plugins.dat belongs to the vlc package,
685
# this script is probably not really needed
686
[ "$1" = '0' ] && \
687
[ -f %{_libdir}/vlc/plugins/plugins.dat ] && \
688
rm -f %{_libdir}/vlc/plugins/plugins.dat
701 689
702 690
#----------------------------------------------------------------------------
703 691
... ... @@ -1440,5 +1430,10 @@ install -m 644 %{pngdir}/16x16/vlc.png %{buildroot}/%{_miconsdir}/vlc.png
1430 1430
install -m 644 %{pngdir}/32x32/vlc.png %{buildroot}/%{_iconsdir}/vlc.png
1431 1431
install -m 644 %{pngdir}/48x48/vlc.png %{buildroot}/%{_liconsdir}/vlc.png
1432 1432
1433
1434 1433
%find_lang %{name}
1434
1435
mkdir -p %{buildroot}%{_filetriggers_dir}
1436
cat %{SOURCE10} | sed -e 's,@LIBDIR@,%{_libdir},g' > %{buildroot}%{_filetriggers_dir}/vlc-plugins.filter
1437
cat %{SOURCE11} | sed -e 's,@LIBDIR@,%{_libdir},g' > %{buildroot}%{_filetriggers_dir}/vlc-plugins.script
1438
chmod 0644 %{buildroot}%{_filetriggers_dir}/vlc-plugins.filter
1439
chmod 0755 %{buildroot}%{_filetriggers_dir}/vlc-plugins.script

Comments