summaryrefslogtreecommitdiffstats
path: root/graphics/mplayer/files/install-user
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mplayer/files/install-user')
-rw-r--r--graphics/mplayer/files/install-user38
1 files changed, 38 insertions, 0 deletions
diff --git a/graphics/mplayer/files/install-user b/graphics/mplayer/files/install-user
new file mode 100644
index 0000000..8f0dda4
--- /dev/null
+++ b/graphics/mplayer/files/install-user
@@ -0,0 +1,38 @@
+#This perl script links the codec config file
+#and the fonts dir to the user's home dir.
+
+if (-e "$ENV{HOME}/.mplayer/")
+{
+ print "Sorry, you should execute this target without having a .mplayer directory in your homedir.\n";
+ exit 1;
+}
+
+#Determining location of fonts:
+
+@pkg=`pkg_info -Lx mplayer-fonts`;
+print "$prefix[3]";
+$prefix=$pkg[3];
+$prefix=~ s/(.+mplayer).*/$1/;
+chop $prefix;
+
+print "You may choose any of the available language sets:\n\n";
+print "European fonts (e.g. dutch, french, german...) : e\n";
+print "Cyrillic fonts : c\n";
+print "Russian fonts: r\n";
+
+print "Your decision? ";
+chomp ($lang=<STDIN>);
+print "\n";
+
+system "mkdir $ENV{HOME}/.mplayer";
+if ($lang eq "c")
+{
+ system "ln -s $prefix/fonts/cyrillic/ $ENV{HOME}/.mplayer/font";
+}
+elsif ($lang eq "r")
+{
+ system "ln -s $prefix/fonts/koi8r/ $ENV{HOME}/.mplayer/font";
+}
+else {system "ln -s $prefix/fonts/iso/ $ENV{HOME}/.mplayer/font"};
+
+system "ln -s $prefix/codecs.conf $ENV{HOME}/.mplayer/codecs.conf";
OpenPOWER on IntegriCloud