All pastes #176424 Raw Edit

buildlog 0.7.2

public text v1 · immutable
#176424 ·published 2006-09-19 17:20 UTC
rendered paste body

[root@frontend1 SPECS]# cat lirc72.spec
# Driver TODO, sometime maybe:
# - audio (req: portaudio)
# - caraca (req: caraca_client)
# - irman: (req: libirman)
# - drivers that need drivers/media/video/bttv*.h (not in kernel-module-devel)
#   - gpio: flyvideo avermedia avermedia98
#   - i2c: hauppauge
# Other TODO:
# - move to -devel (?): irw, *mode2, others?
# - don't run as root and/or create dedicated group, reduce fifo permissions?
# - Fixup /etc/lirc(m)d.conf %%ghost'ification, existence after erase etc.
# - kernel modules: Figure out sane permissions for /dev/lirc, use
#   console.perms/udev, general FC3 adjustments.

%{!?kernel: %{expand: %%define kernel %(uname -r)}}
%define ksrc %{_libdir}/kernel-module-devel/%{kernel}-%{_target_cpu}
# Kernel module drivers
%define drivers sir_com3 it87 tekram_bt829 com1 atiusb mceusb lpt1

Name:           lirc
Version:        0.7.2
Release:        1
Summary:        The Linux Infrared Remote Control package

Group:          System Environment/Daemons
License:        GPL
URL:            http://www.lirc.org/
Source0:        http://download.sourceforge.net/lirc/%{name}-%{version}.tar.bz2
Source1:        %{name}.init
Source2:        %{name}.sysconfig
Source3:        %{name}.makedev
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  %{__perl}
%if 0%{!?_with_kmod:1}
BuildRequires:  alsa-lib-devel XFree86-devel libusb-devel
BuildConflicts: svgalib-devel
%endif
Requires(post): /sbin/chkconfig /sbin/ldconfig
Requires(preun): /sbin/chkconfig
Requires(postun): /sbin/ldconfig

%description
LIRC is the Linux Infrared Remote Control package.

%package        devel
Summary:        Development files for LIRC
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
%{summary}.

%package     -n kernel-module-%{name}-%{kernel}
Summary:        Kernel modules for LIRC
Group:          System Environment/Kernel
Provides:       kernel-module
Provides:       kernel-module-%{name} = %{version}
%if 0%{?_with_kmod:1}
BuildRequires:  %{ksrc} MAKEDEV
%endif
Requires:       modutils %{name} = %{version}
Requires:       /boot/vmlinuz-%{kernel}

%description -n kernel-module-%{name}-%{kernel}
LIRC kernel modules built for kernel
%{kernel} (%{_target_cpu}).


%prep
%setup -q
%{__perl} -pi -e 's|^CFLAGS="-O2 -g -Wall"|CFLAGS="\$CFLAGS -Wall"|' configure
chmod 644 contrib/*


%build
%if 0%{?_with_kmod:1}
for driver in %{drivers} ; do
  # lpt1 is not smp safe @@@ TODO: verify this?
  test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue
  mkdir -p buildroot/"$driver"
  %configure \
    --enable-sandboxed \
    --enable-debug \
    --disable-dependency-tracking \
    --with-kerneldir=%{ksrc} \
    --with-moduledir=/tmp \
    --with-driver=$driver
  make %{?_smp_mflags} -C drivers
  make -C drivers install DESTDIR=$PWD/buildroot/$driver
done
%else
%configure \
  --with-syslog=LOG_DAEMON \
  --enable-sandboxed \
  --enable-debug \
  --disable-dependency-tracking \
  --with-driver=any
make %{?_smp_mflags}
%endif


%install
rm -rf $RPM_BUILD_ROOT __docs

%if 0%{?_with_kmod:1}
for driver in %{drivers} ; do
  # lpt1 is not SMP safe @@@ TODO: verify this?
  test $driver = lpt1 && grep -q '^CONFIG_SMP=y' %{ksrc}/.config && continue
  install -dm 755 $RPM_BUILD_ROOT/lib/modules/%{kernel}/updates/lirc
  # 0755 here to allow stripping, fixed later in %%files
  install -pm 755 buildroot/$driver/tmp/* \
    $RPM_BUILD_ROOT/lib/modules/%{kernel}/updates/lirc
done
install -Dpm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d/lirc
cp -p %{_sysconfdir}/makedev.d/00macros $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d
/dev/MAKEDEV -M \
  -c $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d \
  -d $RPM_BUILD_ROOT/dev lirc \
  | sed "s|$RPM_BUILD_ROOT||g" \
  | grep -v ' /dev$' \
  > devices.list
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/makedev.d/00macros

%else
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smode2.1* # if no svgalib
install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/lirc
%{__perl} -pi -e \
  's|/etc/|%{_sysconfdir}/|g ;
   s|/var/|%{_localstatedir}/|g ;
   s|/usr/sbin/|%{_sbindir}/|g' \
  $RPM_BUILD_ROOT%{_initrddir}/lirc
install -Dpm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/lirc
mkdir __docs
cp -pR doc contrib __docs
cd __docs
rm -rf doc/Makefile* doc/.libs doc/man* contrib/lirc.* contrib/sendxevent.c
cd ..
touch $RPM_BUILD_ROOT%{_sysconfdir}/lirc{d,md}.conf
install -dm 755 $RPM_BUILD_ROOT/dev
touch $RPM_BUILD_ROOT/dev/lirc{d,m}
%endif


%clean
rm -rf $RPM_BUILD_ROOT


%post
/sbin/ldconfig
/sbin/chkconfig --add lirc
# Backwards compatibility (init script lircd -> lirc rename):
if [ $1 -gt 0 -a -x %{_initrddir}/lircd ] ; then
  %{_initrddir}/lircd status >/dev/null 2>&1
  ret=$?
  %{_initrddir}/lircd stop >/dev/null || :
  /sbin/chkconfig --del lircd || :
  if [ $ret -eq 0 ] ; then
    %{_initrddir}/lirc start >/dev/null || :
  fi
fi

%post -n kernel-module-%{name}-%{kernel}
depmod -ae -F /boot/System.map-%{kernel} %{kernel} >/dev/null || :

%preun
if [ $1 -eq 0 ] ; then
  %{_initrddir}/lirc stop >/dev/null || :
  /sbin/chkconfig --del lirc || :
fi

%postun
/sbin/ldconfig
if [ $1 -gt 0 ] ; then
  %{_initrddir}/lirc try-restart >/dev/null || :
fi

%postun -n kernel-module-%{name}-%{kernel}
depmod -ae -F /boot/System.map-%{kernel} %{kernel} >/dev/null || :


%if 0%{!?_with_kmod:1}
%files
%defattr(-,root,root,-)
%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO remotes __docs/*
%ghost %config(noreplace) %{_sysconfdir}/lirc*d.conf
%config(noreplace) %{_sysconfdir}/sysconfig/lirc
%config %{_initrddir}/lirc
%{_bindir}/ir*
%{_bindir}/*mode2
%{_sbindir}/lirc*d
%{_libdir}/liblirc_client.so.*
%{_mandir}/man1/ir*.1*
%{_mandir}/man1/*mode2*.1*
%{_mandir}/man8/lirc*d.8*
%ghost /dev/lirc*

%files devel
%defattr(-,root,root,-)
%{_includedir}/lirc
%{_libdir}/liblirc_client.a
%{_libdir}/liblirc_client.so
%exclude %{_libdir}/liblirc_client.la
%endif

%if 0%{?_with_kmod:1}
%files -n kernel-module-%{name}-%{kernel} -f devices.list
%defattr(644,root,root,755)
%config %{_sysconfdir}/makedev.d
/lib/modules/%{kernel}/updates
%endif


%changelog
* Sun Dec  5 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.7.0-1
- Update to 0.7.0; major rework of the package:
- Change default driver to "any".
- Add -devel subpackage.
- Improve init script, add %%{_sysconfdir}/sysconfig/lirc for options.
- Rename init script to "lirc" to follow upstream; the script is not only
  for lircd, but lircmd as well.
- Log to syslog instead of separate log file.
- %%ghost'ify /dev/lirc*.
- Build kernel modules when rebuilt with "--with kmod".  This stuff was mostly
  borrowed from Axel Thimm's packages, and is not really ready for FC3+ yet.
- Enable debugging features.
- Specfile cleanups.

* Mon Aug 30 2004 Matthias Saou <http://freshrpms.net/> 0.6.6-3
- Added missing /sbin/ldconfig calls.

* Wed May 19 2004 Matthias Saou <http://freshrpms.net/> 0.6.6-2
- Rebuild for Fedora Core 2... this spec file still _really_ needs reworking!

* Fri Nov  7 2003 Matthias Saou <http://freshrpms.net/> 0.6.6-2
- Rebuild for Fedora Core 1... this spec file _really_ needs reworking!

* Mon Mar 31 2003 Matthias Saou <http://freshrpms.net/>
- Rebuilt for Red Hat Linux 9... this spec file needs some reworking!

* Mon Oct  7 2002 Matthias Saou <http://freshrpms.net/>
- Update to 0.6.6 final.

* Mon Sep 16 2002 Matthias Saou <http://freshrpms.net/>
- Updated to latest pre-version.
- Kernel modules still need to be compiled separately and with a custom
  kernel :-(

* Thu May  2 2002 Matthias Saou <http://freshrpms.net/>
- Update to 0.6.5.
- Rebuilt against Red Hat Linux 7.3.
- Added the %%{?_smp_mflags} expansion.

* Thu Oct  4 2001 Matthias Saou <http://freshrpms.net/>
- Initial RPM release.

[root@frontend1 SPECS]# rpmbuild -bp --target=i686 lirc72.spec
Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.4560
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf lirc-0.7.2
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/lirc-0.7.2.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd lirc-0.7.2
++ /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 .
+ /usr/bin/perl -pi -e 's|^CFLAGS="-O2 -g -Wall"|CFLAGS="\$CFLAGS -Wall"|' configure
+ chmod 644 contrib/irman2lirc contrib/lirc.debian contrib/lirc.m4 contrib/lirc.redhat contrib/lirc.rules contrib/lirc.suse contrib/lirc.suse6.2 contrib/lirc.suse7.1 contrib/lircd.conf contrib/lircmd.conf contrib/lircrc contrib/lircs contrib/sendxevent.c
+ exit 0


setup.sh written by Karsten Scheibler, 1999-JUN-28

If you have problems or questions please consult the mailing list
<http://lists.sourceforge.net/mailman/listinfo/lirc-list>

Configuration: .setup.config, executable shell script: configure.sh
Starting the generated shell script which will call configure with the right
parameters...
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for gcc... gcc
checking whether the C compiler (gcc  -Wall ) works... yes
checking whether the C compiler (gcc  -Wall ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD compatible install... /usr/bin/install -c
checking whether make sets ${MAKE}... (cached) yes
checking for mknod... /bin/mknod
checking for mkfifo... /usr/bin/mkfifo
checking for depmod... /sbin/depmod
checking for libusb-config... /usr/bin/libusb-config
checking whether ln -s works... yes
checking for Cygwin environment... no
checking for mingw32 environment... no
checking how to run the C preprocessor... gcc -E
checking host system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking for a sed that does not truncate output... /bin/sed
checking how to recognise dependent libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/bin/nm -B output... ok
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for syslog.h... yes
checking for unistd.h... yes
checking for working const... yes
checking for inline... inline
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for vprintf... yes
checking for gethostname... yes
checking for gettimeofday... yes
checking for mkfifo... yes
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strerror... yes
checking for strtoul... yes
checking for snprintf... yes
checking for strsep... yes
checking for vsyslog... yes
checking for daemon... yes
checking for forkpty... no
checking for forkpty in -lutil... yes
checking for vga.h... no
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for getopt_long... yes
checking for mktemp... yes
checking for Linux kernel sources... /usr/src/linux/
checking for which drivers can be installed on this system...
checking for caraca_init in -lcaraca_client... no
checking for ir_strerror in -lirman... no
checking for ir_strerror in -lirman_sw... no
checking for portaudio.h... yes
checking for Pa_Initialize in -lportaudio... yes
checking for alsa/asoundlib.h... yes
checking for snd_pcm_open in -lasound... yes
checking for ALSA SB RC hwdep support... no
checking for scsi/sg.h... yes
checking for linux/input.h... yes
checking for sys/soundcard.h... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating drivers/Makefile
creating drivers/lirc_atiusb/Makefile
creating drivers/lirc_bt829/Makefile
creating drivers/lirc_cmdir/Makefile
creating drivers/lirc_dev/Makefile
creating drivers/lirc_gpio/Makefile
creating drivers/lirc_i2c/Makefile
creating drivers/lirc_igorplugusb/Makefile
creating drivers/lirc_imon/Makefile
creating drivers/lirc_it87/Makefile
creating drivers/lirc_mceusb/Makefile
creating drivers/lirc_mceusb2/Makefile
creating drivers/lirc_parallel/Makefile
creating drivers/lirc_sasem/Makefile
creating drivers/lirc_serial/Makefile
creating drivers/lirc_sir/Makefile
creating drivers/lirc_streamzap/Makefile
creating daemons/Makefile
creating tools/Makefile
creating doc/Makefile
creating doc/man/Makefile
creating config.h

You will have to use the lirc_serial kernel module.

Now enter 'make' and 'make install' to compile and install the package.

[root@frontend1 lirc-0.7.2]# make
make  all-recursive
make[1]: Entering directory `/usr/src/redhat/BUILD/lirc-0.7.2'
Making all in drivers
make[2]: Entering directory `/usr/src/redhat/BUILD/lirc-0.7.2/drivers'
Making all in lirc_dev
make[3]: Entering directory `/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev'
mv Makefile Makefile.automake
cp ../Makefile.kernel Makefile
make -C /usr/src/linux/ SUBDIRS=/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev modules \
        KBUILD_VERBOSE=1
make[4]: Entering directory `/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9'
mkdir -p /usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/.tmp_versions
make -f scripts/Makefile.build obj=/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev
  gcc -Wp,-MD,/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/.lirc_dev.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement -pipe -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -mregparm=3 -Iinclude/asm-i386/mach-default -DIRCTL_DEV_MAJOR=61 -DEXPORT_SYMTAB -DHAVE_CONFIG_H -I. -I. -I../.. -I /usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/../.. -I /usr/src/linux//include/  -DMODULE -DKBUILD_BASENAME=lirc_dev -DKBUILD_MODNAME=lirc_dev -c -o /usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/.tmp_lirc_dev.o /usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/lirc_dev.c
In file included from /usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/lirc_dev.c:61:
/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/../../drivers/kcompat.h:20: error: conflicting types for 'class_create'
include/linux/device.h:242: error: previous declaration of 'class_create' was here
/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/../../drivers/kcompat.h:20: error: conflicting types for 'class_create'
include/linux/device.h:242: error: previous declaration of 'class_create' was here
/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/../../drivers/kcompat.h:25: error: conflicting types for 'class_destroy'
include/linux/device.h:243: error: previous declaration of 'class_destroy' was here
/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/../../drivers/kcompat.h:25: error: conflicting types for 'class_destroy'
include/linux/device.h:243: error: previous declaration of 'class_destroy' was here
/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/lirc_dev.c: In function `lirc_thread':
/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/lirc_dev.c:207: warning: `interruptible_sleep_on' is deprecated (declared at include/linux/wait.h:290)
make[5]: *** [/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev/lirc_dev.o] Error 1
make[4]: *** [_module_/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev] Error 2
make[4]: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9'
make[3]: *** [lirc_dev.o] Error 2
make[3]: Leaving directory `/usr/src/redhat/BUILD/lirc-0.7.2/drivers/lirc_dev'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/lirc-0.7.2/drivers'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/lirc-0.7.2'
make: *** [all] Error 2