Hello, one time I made an rpm for Kcometen3
(see this post: Create An Rpm For Kcometen3 Screensaver - openSUSE Forums
Now I am trying to make an rpm for kcometen4…
(on suse 11.1, I did install all the development tools)
I edited the old spec file to this:
Name: kcometen4
Version: 1.0.3
Release: 1
Vendor: John Stamp
License: GPL
Summary: Screensaver
Group: System/GUI/KDE
Packager: Henkees Ingelse <henkees@henkees-markus.nl>
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Source: http://www.mehercule.net/kcometen4/kcometen4-1.0.3.tar.gz
BuildArch: x86_64
%description
SuSE 11.1 RPM x86_64 Screensaver for KDE4
%prep -q
%setup
%build
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
%configure
make DESTDIR=$RPM_BUILD_ROOT
%install -d
install -D $RPM_BUILD_DIR/%{name}-%{version}/build/src/kcometen4.kss $RPM_BUILD_ROOT/usr/bin/kcometen4.kss
install -D $RPM_BUILD_DIR/%{name}-%{version}/src/lightmap.png $RPM_BUILD_ROOT/usr/share/kde4/apps/kcometen4/pixmaps/lightmap.png
install -D $RPM_BUILD_DIR/%{name}-%{version}/src/particle.png $RPM_BUILD_ROOT/usr/share/kde4/apps/kcometen4/pixmaps/particle.png
install -D $RPM_BUILD_DIR/%{name}-%{version}/src/kcometen4.desktop $RPM_BUILD_ROOT/usr/share/kde4/services/ScreenSavers/kcometen4.desktop
install -D $RPM_BUILD_DIR/%{name}-%{version}/src/kcometen4.kss.1 $RPM_BUILD_ROOT/usr/local/man/man1/kcometen4.kss.1
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
/usr/bin/kcometen4.kss
/usr/share/kde4/apps/kcometen4/pixmaps/lightmap.png
/usr/share/kde4/apps/kcometen4/pixmaps/particle.png
/usr/share/kde4/services/ScreenSavers/kcometen4.desktop
/usr/local/man/man1/kcometen4.kss.1
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog INSTALL
%changelog
* Sun Feb 9 2009 Henkees Ingelse <henkees@henkees-markus.nl>
- RPM made from sourcefile
When I run rpmbuild -ba kcometen4.spec; I get this:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.62518
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf kcometen4-1.0.3
+ tar -xvvf -
+ /usr/bin/gzip -dc /usr/src/packages/SOURCES/kcometen4-1.0.3.tar.gz
drwxr-xr-x root/root 0 2008-09-20 20:06 kcometen4-1.0.3/
-rw-r--r-- root/root 17987 2008-07-17 02:02 kcometen4-1.0.3/COPYING
-rw-r--r-- root/root 1213 2008-09-01 21:46 kcometen4-1.0.3/INSTALL
-rw-r--r-- root/root 1235 2008-08-24 18:56 kcometen4-1.0.3/CMakeLists.txt
-rw-r--r-- root/root 133 2008-07-01 02:21 kcometen4-1.0.3/AUTHORS
drwxr-xr-x root/root 0 2008-09-18 23:33 kcometen4-1.0.3/src/
-rw-r--r-- root/root 5626 2008-09-15 18:08 kcometen4-1.0.3/src/kglcometen4.cpp
-rw-r--r-- root/root 6604 2008-09-17 05:30 kcometen4-1.0.3/src/pcomet.cpp
-rw-r--r-- root/root 863 2005-10-07 16:38 kcometen4-1.0.3/src/lightmap.png
-rw-r--r-- root/root 2608 2008-09-15 18:08 kcometen4-1.0.3/src/kcometen4.h
-rw-r--r-- root/root 933 2006-04-16 19:53 kcometen4-1.0.3/src/particle.png
-rw-r--r-- root/root 24132 2008-09-18 18:01 kcometen4-1.0.3/src/kcometen4ui.ui
-rw-r--r-- root/root 4721 2008-07-17 02:02 kcometen4-1.0.3/src/bezier.cpp
-rw-r--r-- root/root 2238 2008-07-17 02:02 kcometen4-1.0.3/src/comet.h
-rw-r--r-- root/root 2738 2008-07-17 02:02 kcometen4-1.0.3/src/cometenscene.h
-rw-r--r-- root/root 2068 2008-08-01 21:07 kcometen4-1.0.3/src/bezier.h
-rw-r--r-- root/root 2191 2008-07-17 02:02 kcometen4-1.0.3/src/glow.h
-rw-r--r-- root/root 4104 2008-09-17 05:30 kcometen4-1.0.3/src/particlesystem.h
-rw-r--r-- root/root 8200 2008-09-17 05:30 kcometen4-1.0.3/src/rotatecomet.cpp
-rw-r--r-- root/root 2395 2008-07-17 02:02 kcometen4-1.0.3/src/cometenmath.h
-rw-r--r-- root/root 783 2008-09-15 18:08 kcometen4-1.0.3/src/CMakeLists.txt
-rw-r--r-- root/root 9353 2008-09-17 05:30 kcometen4-1.0.3/src/curvecomet.cpp
-rw-r--r-- root/root 1970 2008-09-18 23:33 kcometen4-1.0.3/src/global.h
-rw-r--r-- root/root 3120 2008-07-17 02:02 kcometen4-1.0.3/src/curvecomet.h
-rw-r--r-- root/root 2922 2008-07-17 02:02 kcometen4-1.0.3/src/vec.cpp
-rw-r--r-- root/root 3059 2008-07-17 02:02 kcometen4-1.0.3/src/lightning.h
-rw-r--r-- root/root 2812 2008-07-01 02:34 kcometen4-1.0.3/src/kcometen4.desktop
-rw-r--r-- root/root 8703 2008-09-15 18:08 kcometen4-1.0.3/src/cometenscene.cpp
-rw-r--r-- root/root 2318 2008-09-15 18:08 kcometen4-1.0.3/src/kglcometen4.h
-rw-r--r-- root/root 3501 2008-08-02 20:47 kcometen4-1.0.3/src/cometen3.h
-rw-r--r-- root/root 2082 2008-07-17 02:02 kcometen4-1.0.3/src/cometenmath.cpp
-rw-r--r-- root/root 3814 2008-09-03 19:33 kcometen4-1.0.3/src/kcometen4.kss.1
-rw-r--r-- root/root 2996 2008-09-17 05:30 kcometen4-1.0.3/src/explosion.cpp
-rw-r--r-- root/root 2245 2008-07-17 02:02 kcometen4-1.0.3/src/explosion.h
-rw-r--r-- root/root 9247 2008-07-17 02:02 kcometen4-1.0.3/src/vec.h
-rw-r--r-- root/root 7888 2008-07-17 02:02 kcometen4-1.0.3/src/lightning.cpp
-rw-r--r-- root/root 7749 2008-09-17 05:30 kcometen4-1.0.3/src/particlesystem.cpp
-rw-r--r-- root/root 4329 2008-09-15 18:08 kcometen4-1.0.3/src/settings.cpp
-rw-r--r-- root/root 14828 2008-09-17 05:30 kcometen4-1.0.3/src/cometen3.cpp
-rw-r--r-- root/root 2761 2008-07-17 02:02 kcometen4-1.0.3/src/decal.h
-rw-r--r-- root/root 2890 2008-07-17 02:02 kcometen4-1.0.3/src/decal.cpp
-rw-r--r-- root/root 3039 2008-07-17 02:02 kcometen4-1.0.3/src/pcomet.h
-rw-r--r-- root/root 3894 2008-07-17 02:02 kcometen4-1.0.3/src/glow.cpp
-rw-r--r-- root/root 2029 2008-09-15 18:08 kcometen4-1.0.3/src/settings.h
-rw-r--r-- root/root 12361 2008-09-18 23:21 kcometen4-1.0.3/src/kcometen4.cpp
-rw-r--r-- root/root 3177 2008-07-17 02:02 kcometen4-1.0.3/src/rotatecomet.h
-rw-r--r-- root/root 1259 2008-09-18 23:29 kcometen4-1.0.3/ChangeLog
-rwxr-xr-x root/root 1486 2008-09-01 21:44 kcometen4-1.0.3/configure
+ STATUS=0
+ '' 0 -ne 0 ']'
+ cd kcometen4-1.0.3
++ /usr/bin/id -u
+ '' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.62518
+ umask 022
+ cd /usr/src/packages/BUILD
+ /bin/rm -rf /var/tmp/kcometen4-1.0.3-buildroot
++ dirname /var/tmp/kcometen4-1.0.3-buildroot
+ /bin/mkdir -p /var/tmp
+ /bin/mkdir /var/tmp/kcometen4-1.0.3-buildroot
+ cd kcometen4-1.0.3
+ CFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
+ CXXFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
+ CFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables'
+ export FFLAGS
+ ./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --target=x86_64-suse-linux--program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64 --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
configure: unrecognized option '--host=x86_64-suse-linux-gnu'
configure: unrecognized option '--target=x86_64-suse-linux'
configure: unrecognized option '--program-prefix='
configure: unrecognized option '--exec-prefix=/usr'
configure: unrecognized option '--bindir=/usr/bin'
configure: unrecognized option '--sbindir=/usr/sbin'
configure: unrecognized option '--sysconfdir=/etc'
configure: unrecognized option '--datadir=/usr/share'
configure: unrecognized option '--includedir=/usr/include'
configure: unrecognized option '--libdir=/usr/lib64'
configure: unrecognized option '--libexecdir=/usr/lib64'
configure: unrecognized option '--localstatedir=/var'
configure: unrecognized option '--sharedstatedir=/usr/com'
configure: unrecognized option '--mandir=/usr/share/man'
configure: unrecognized option '--infodir=/usr/share/info'
`configure' provides a very simple wrapper for a generic cmake configuration.
Those needing more flexibility should run cmake directly.
Usage: ./configure [OPTION]...
Options:
-p, --prefix PREFIX install files in PREFIX [/usr/local]
-b, --build-directory BUILDDIR build the package in BUILDDIR ./build]
-h, --help display this help and exit
error: Bad exit status from /var/tmp/rpm-tmp.62518 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.62518 (%build)
As you can see; the build tag is giving wrong and/or extra flags to configure / cmake.
When I add configure flags to %configure; they are ignored.
Since suse 11.1 I have these kind of errors with the %build tag.
How can I override these default flags?
Probably I am doing something terrible wrong…:shame:
Please can someone help me further? I have no idea anymore…