aboutsummaryrefslogtreecommitdiffstats
path: root/bootsplash.spec
blob: 9262acb51d203eebae4785bb4192acd680fa514b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
%define name bootsplash
%define version 3.2.2
%define release %mkrel 1
%define _bootdir /boot

Summary: The Boot Splash Images and scripts
Name: %{name}
Version: %{version}
Release: %{release}
# From Mandriva SVN
Source0: %{name}.tar
License: GPL
Group: System/Kernel and hardware
BuildRoot: %{_tmppath}/%{name}-buildroot
Url:       http://svn.mandriva.com/cgi-bin/viewvc.cgi/soft/bootsplash/
Requires: /usr/bin/perl
# Do not require mkinitrd anymore to be able to be prerequed by mkinitrd (mkinitrd is in basesystem anyway)
# Requires: mkinitrd >= 3.5.18-14mdk
Conflicts: mkinitrd < 3.5.18-14mdk
#there is no way to say a special kernel requires.
Requires: kernel initscripts > 7.04-15mdk fbgrab
Conflicts: drakxtools-newt < 10-49mdk
Obsoletes: Aurora Aurora-Monitor-NewStyle-Categorizing-WsLib Aurora-Monitor-NewStyle-WsLib Aurora-Monitor-Traditional-Gtk+ Aurora-Monitor-Traditional-WsLib-8.2
BuildRequires: freetype2-static-devel libmng-static-devel libjpeg-static-devel glibc-static-devel liblcms-devel gtk-linux-fb-2.0-devel gtk+2-devel
# nomore noarch with the fbrelolution and progress binaries
#BuildArchitectures: noarch

%description
This package contains the scripts and pictures visible when booting a
Mandriva Linux kernel.  They are automatically installed when an initrd is
generated by mkinitrd.

%prep
%setup -q

%build
make LIB=%{_lib}

%install
rm -rf $RPM_BUILD_ROOT
make install prefix=$RPM_BUILD_ROOT

install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}

for i in fbmngplay fbtruetype 
do
   cp $i/ChangeLog $i/ChangeLog.$i
   cp $i/README $i/README.$i
done

#find $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/ $RPM_BUILD_ROOT/%_datadir/%{name}/ -not -path "*/themes/Mandrake/*" -not -path "*/scripts/*" -type f |
#  sed -e "s#^$RPM_BUILD_ROOT##g" > rpm-themes-files

install -d -m755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/themes
install -d -m755 $RPM_BUILD_ROOT%{_datadir}/%{name}/themes

%find_lang bootsplash

%post
# Add right translation file
for i in `echo $LANGUAGE:$LC_ALL:$LC_COLLATE:$LANG:C | tr ':' ' '`
do      
        if [ -r %{_datadir}/locale/$i/LC_MESSAGES/bootsplash.mo ]; then
                mkdir -p /etc/locale/$i/LC_MESSAGES/
                cp %{_datadir}/locale/$i/LC_MESSAGES/SYS_LC_MESSAGES \
                        /etc/locale/$i/LC_MESSAGES/
                cp %{_datadir}/locale/$i/LC_MESSAGES/bootsplash.mo \
                        /etc/locale/$i/LC_MESSAGES/
            break
        fi
done
/sbin/ldconfig
    
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %name.lang
%defattr(-,root,root)
%doc README ChangeLog fbmngplay/ChangeLog.fbmngplay fbmngplay/README.fbmngplay fbtruetype/ChangeLog.fbtruetype fbtruetype/README.fbtruetype
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/themes
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/themes
%{_datadir}/%{name}/scripts
#%_datadir/%{name}/themes/Mandrake
#%config(noreplace) %_sysconfdir/%{name}/themes/Mandrake/*
/bin/fbresolution
/bin/fbtruetype.static
/bin/fbmngplay.static
/bin/progress
/sbin/bootanim
/sbin/splash
/sbin/splash.sh
%{_bindir}/*