PDA

View Full Version : building avidemux 2.3


jim
2nd January 2007, 02:10 PM
I've run into a snag building avidemux 2.3

here are the spec file (Below) & source I'm building with. source is here http://jimlawrnc.mine.nu/mywiki/AvidemuxAvi

I did find a spidermonkey rpm and installed but same error
spidermonkey rpm here -->http://packages.ccux-linux.de/index.php?pdetail=1027
%define name avidemux
%define ver 2.3.0
%define rel 1
%define prefix /usr

Summary: A graphical multiplex/demultiplex tool using GTK.
Name: %name
Version: %ver
Release: %rel
License: GPL
Group: Applications/Multimedia
Packager: James Lawrence <jimlawrnc@gmail.com>

Source: %{name}-%{version}.tar.gz
URL: http://fixounet.free.fr/avidemux/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gcc >= 2.96
BuildRequires: glib-devel
BuildRequires: gtk+-devel >= 2.0.0
BuildRequires: nasm >= 0.98.22
Requires: glib
Requires: gtk+ >= 2.0.0

%description
Avidemux is a graphical tool to edit AVI. It allows you to multiplex and
demultiplex audio to/from video.

It is able to cut video, import BMP, MJPEG and MPEG video, and encode them.
You can also process video with included filters. It requires a DivX
compatible encoder and the Gimp Toolkit (GTK) libraries.

%prep
%setup

%build

LC_MESSAGES=C ; export LC_MESSAGES

if [ ! -f configure ]; then
CC=gcc CXX=g++ \
CFLAGS="$RPM_OPT_FLAGS" \
CXXFLAGS="$RPM_OPT_FLAGS" \
./autogen.sh \
--prefix=%{_prefix} \
--datadir=%{_datadir}/%{name} \
--sysconfdir=%{_sysconfdir}/%{name} \
--host=%{_target_platform} \
--disable-warnings
else
CC=gcc CXX=g++ \
CFLAGS="$RPM_OPT_FLAGS" \
CXXFLAGS="$RPM_OPT_FLAGS" \
./configure --with-jsapi-include=/usr/include/firefox-2.0.0.1/js/jsapi.h \
--prefix=%{_prefix} \
--datadir=%{_datadir}/%{name} \
--sysconfdir=%{_sysconfdir}/%{name} \
--host=%{_target_platform} \
--disable-warnings

fi

# if RPM_BUILD_NCPUS unset, set it
if [ -z "$RPM_BUILD_NCPUS" ] ; then
if [ -x /usr/bin/getconf ] ; then
RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
if [ $RPM_BUILD_NCPUS -eq 0 ]; then
RPM_BUILD_NCPUS=1
fi
else
RPM_BUILD_NCPUS=1
fi
fi

#make -j$RPM_BUILD_NCPUS
make

%install
rm -rf %{buildroot}
%makeinstall

%clean
rm -rf %{buildroot}

%files
%defattr(755, root, root)

%{_bindir}/%{name}

%changelog
* Tue Jan 02 2007 James Lawrence <jimlawrnc@gmail.com> 2.3.0
- built for 2.3 release
- configure with firefox 2.0

Error

checking for jsapi.h... no
configure: WARNING: I did not find a working copy of jsapi.h and the associated library.
configure: WARNING: <1>- Not reachable : Make sure you have spidermonkey installed
configure: WARNING: Then use --with-jsapi-include=/path/to/jsapi.h/
configure: WARNING: <2>- Make sure the library is in your LD_LIBRARY_PATH and/or LDFLAGS
configure: WARNING: <3>- Make sure multithreading is enabled in your spidermonkey
configure: WARNING: The ones from mozilla-dev or firefox-dev are ok
configure: error: *** Working SPIDERMONKEY javascript engine not found !***
error: Bad exit status from /var/tmp/rpm-tmp.41459 (%build)

hence in the configure section of the spec file above highlighted in red

LocutusOfBorg
2nd January 2007, 02:37 PM
spidermonkey is in extras (js and js-devel).
in my specfile i use
%_configure --prefix=%{_prefix} --with-jsapi-include=%{_includedir}

wmc1369
2nd January 2007, 03:09 PM
If you use the livna repo you can just do "yum install avidemux". That's how I got it and it works fine for me.

jim
2nd January 2007, 04:02 PM
If you use the livna repo you can just do "yum install avidemux". That's how I got it and it works fine for me.
what version ?

jim
2nd January 2007, 04:05 PM
spidermonkey is in extras (js and js-devel).
in my specfile i use
%_configure --prefix=%{_prefix} --with-jsapi-include=%{_includedir}
can you post the spec file your using?

wmc1369
2nd January 2007, 04:07 PM
Available Packages
avidemux.i386 2.1.2-1.lvn6 livna

jim
2nd January 2007, 04:09 PM
Available Packages
avidemux.i386 2.1.2-1.lvn6 livna

I'm trying to build v. 2.3.0 final release

LocutusOfBorg
2nd January 2007, 04:09 PM
It's basically the livna specfile, modified to suit my needs.
The %_configure macro simply run the ./configure script (that's different from %configure).

jim
2nd January 2007, 05:49 PM
using the above spec file and all dependencies installed

rpmbuild -ba ~/rpmbuild/SPECS/*.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.64984
+ umask 022
+ cd /home/jim/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/jim/rpmbuild/BUILD
+ rm -rf avidemux_2.3.0
+ /bin/gzip -dc /home/jim/rpmbuild/SOURCES/avidemux_2.3.0.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd avidemux_2.3.0
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.57168
+ umask 022
+ cd /home/jim/rpmbuild/BUILD
+ cd avidemux_2.3.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ %_configure --prefix=/usr --with-jsapi-include=/usr/include
/var/tmp/rpm-tmp.57168: line 27: fg: no job control
error: Bad exit status from /var/tmp/rpm-tmp.57168 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.57168 (%build)


/var/tmp/rpm-tmp.57168 shows

#!/bin/sh

RPM_SOURCE_DIR="/home/jim/rpmbuild/SOURCES"
RPM_BUILD_DIR="/home/jim/rpmbuild/BUILD"
RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables"
RPM_ARCH="i386"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="avidemux"
RPM_PACKAGE_VERSION="2.3.0"
RPM_PACKAGE_RELEASE="1.%{_dist}"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/var/tmp/avidemux-2.3.0-1.%{_dist}-root-jim"
export RPM_BUILD_ROOT


set -x
umask 022
cd /home/jim/rpmbuild/BUILD
cd avidemux_2.3.0
LANG=C
export LANG
unset DISPLAY

%_configure --prefix=/usr --with-jsapi-include=/usr/include


make -j3


exit 0

LocutusOfBorg
2nd January 2007, 06:04 PM
I warned you above that the %_configure macro is defined only for me (it's defined in my ~/.rpmmacros file) - replace it with a simple
./configure
BTW, change even the .%{_dist} in the version tag with %{?dist} (without the dot after the number). It should look like
0%{?dist}.jim

Comonfort Travel Photos - Jalandhar - Vyazniki