SPECS (PPCRCD): splashutils.spec - minimal splashutils, dynamicall...

sparky sparky at pld-linux.org
Sat Mar 11 19:38:55 CET 2006


Author: sparky                       Date: Sat Mar 11 18:38:55 2006 GMT
Module: SPECS                         Tag: PPCRCD
---- Log message:
- minimal splashutils, dynamically linked, for ppcrcd

---- Files affected:
SPECS:
   splashutils.spec (1.19 -> 1.19.2.1) 

---- Diffs:

================================================================
Index: SPECS/splashutils.spec
diff -u SPECS/splashutils.spec:1.19 SPECS/splashutils.spec:1.19.2.1
--- SPECS/splashutils.spec:1.19	Thu Mar  9 15:35:10 2006
+++ SPECS/splashutils.spec	Sat Mar 11 19:38:49 2006
@@ -1,35 +1,17 @@
 # $Revision$, $Date$
 #
-# TODO
-#	- find a way to make it work on startup (not initrd imo, at kernel
-#		time - initramfs) + maybe some init.d
-#	- check initramfs (upgrade geninitrd maybe), cause splashutils can
-#		make use of it
-#
 Summary:	Utilities for setting fbsplash
 Summary(pl):	Narzędzia do ustawiania fbsplash
 Name:		splashutils
-Version:	1.1.9.6
-Release:	0.3
+Version:	1.1.9.10
+Release:	0.1
 License:	GPL
 Group:		System
-Source0:	http://dev.gentoo.org/~spock/projects/gensplash/archive/%{name}-%{version}.tar.bz2
-# Source0-md5:	f3fa79161c32c1e76fc6847da3fada9e
-%define		_misc_ver	0.1.3
-Source1:	http://dev.gentoo.org/~spock/projects/gensplash/current/miscsplashutils-%{_misc_ver}.tar.bz2
-# Source1-md5:	f8e92992682bbaf8e6eb2316ac708bc0
-Source2:	%{name}.init
-Source3:	%{name}.sysconfig
-Patch0:		%{name}-makefile.patch
-Patch1:		%{name}-config.patch
+Source0:	http://dev.gentoo.org/~spock/projects/gensplash/current/%{name}-%{version}.tar.bz2
+# Source0-md5:	af1230e0f1bda32b519a6accf6ade734
 URL:		http://dev.gentoo.org/~spock/projects/gensplash/
-BuildRequires:	freetype-static
-BuildRequires:	glibc-static
-BuildRequires:	klibc-static >= 1.1.1-1
-BuildRequires:	libjpeg-static
-BuildRequires:	libpng-static
+BuildRequires:	libjpeg-devel
 BuildRequires:	linux-libc-headers >= 7:2.6.9.1-1.5
-BuildRequires:	zlib-static
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -39,54 +21,66 @@
 Narzędzia do ustawiania fbsplash.
 
 %prep
-%setup -q -a1
-%patch0 -p1
-%patch1 -p1
-rm -rf libs/klibc*
-rm -rf libs/zlib*
+%setup -q
+cat > Makefile << 'EOF'
+PKG_VERSION = %{version}
 
-%build
-%{__make} splash_kern \
-	CC=klcc
+CFLAGS	= -Os
+LDLIBS	= -ljpeg
 
-%{__make} splash_user \
-	CC="%{__cc}" \
-	CFLAGS="%{rpmcflags} -Os"
+all:	splash_helper splash_util
+
+K_OBJS	= $(addprefix kernel/,kernel.o dev.o parse.o render.o image.o \
+		cmd.o common.o list.o effects.o)
+
+splash_helper:	$(K_OBJS)
+	$(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^
+
+kernel/%.o:	%.c config.h splash.h
+	$(CC) $(CFLAGS) -DTARGET_KERNEL -c -o $@ $<
+
+OBJS	= splash.o parse.o render.o image.o cmd.o common.o daemon.o list.o \
+	effects.o
+
+splash_util:	$(OBJS)
+	$(CC) $(LDFLAGS) $(LDLIBS) -o $@ $+
+
+%.o:	%.c config.h splash.h
+	$(CC) $(CFLAGS) -DPKG_VERSION=\"$(PKG_VERSION)\" -c -o $@ $<
+EOF
 
-%{__make} -C miscsplashutils-%{_misc_ver} \
-	CFLAGS="%{rpmcflags} -Os -I/usr/include/freetype2" \
-	LIBDIR="%{_libdir}"
+cat > config.h << 'EOF'
+#define CONFIG_FBSPLASH
+#define THEME_DIR 	"%{_sysconfdir}/splash"
+#define SPLASH_FIFO	"%{_sysconfdir}/splash/.fifo"
+EOF
+
+sed -i 's@"libs/jpeg-6b/jpeglib.h"@<jpeglib.h>@' \
+	image.c
+
+rm -rf libs
+
+%build
+mkdir kernel
+%{__make} \
+	CC="%{__cc}" \
+	CFLAGS="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/splash,/etc/rc.d/init.d,/etc/sysconfig}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/splash,/sbin}
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
-install miscsplashutils-%{_misc_ver}/{fbres,fbtruetype/{fbtruetype,fbtruetype.static}} $RPM_BUILD_ROOT%{_bindir}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/fbsplash
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/fbsplash
+install splash_helper $RPM_BUILD_ROOT/sbin
+install splash_util $RPM_BUILD_ROOT/sbin
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-umask 022 
-/sbin/chkconfig --add fbsplash
-
-%preun
-if [ "$1" = "0" ]; then
-	/sbin/chkconfig --del fbsplash
-fi
-
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS README docs/*
 %dir %{_sysconfdir}/splash
-%attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) /sbin/*
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fbsplash
-%attr(754,root,root) /etc/rc.d/init.d/fbsplash
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -94,6 +88,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.19.2.1  2006/03/11 18:38:49  sparky
+- minimal splashutils, dynamically linked, for ppcrcd
+
 Revision 1.19  2006/03/09 14:35:10  glen
 - quote %{__cc}
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/splashutils.spec?r1=1.19&r2=1.19.2.1&f=u



More information about the pld-cvs-commit mailing list