work for sane-backends 1

This commit is contained in:
Ertuğrul Erata
2015-08-02 22:36:35 +03:00
parent 636428c722
commit 35c121d1b3
30 changed files with 1359 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
import os
def setup():
shelltools.export("AUTOPOINT", "true")
autotools.autoreconf("-fi")
autotools.configure("--with-rpmbuild=/bin/false \
--with-drivers=all \
--enable-nls \
--without-aalib \
--disable-rpath \
--disable-lockdev \
--disable-resmgr \
--disable-ttylock \
--disable-baudboy \
--disable-static")
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s \
udevscriptdir=/lib/udev" % get.installDIR())
HAL_FDI="usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
UDEV_RULES="lib/udev/rules.d/40-libgphoto2.rules"
CAM_LIST="usr/lib/libgphoto2/print-camera-list"
CAM_LIBS="usr/lib/libgphoto2/%s" % get.srcVERSION()
# Create hal directory
pisitools.dodir(shelltools.dirName(HAL_FDI))
# Export the necessary env variables
shelltools.export("CAMLIBS", "%s/%s" % (get.installDIR(), CAM_LIBS))
shelltools.export("LIBDIR", "%s/usr/lib/" % get.installDIR())
shelltools.export("LD_LIBRARY_PATH", "%s/usr/lib/" % get.installDIR())
# Generate HAL FDI file
f = open(os.path.join(get.installDIR(), HAL_FDI), "w")
f.write(os.popen("%s/%s hal-fdi" % (get.installDIR(), CAM_LIST)).read())
f.close()
# Generate UDEV rule which will replace the HAL FDI when HAL is deprecated
pisitools.dodir("/lib/udev/rules.d")
f = open(os.path.join(get.installDIR(), UDEV_RULES), "w")
f.write(os.popen("%s/%s udev-rules version 136" % (get.installDIR(), CAM_LIST)).read())
f.close()
pisitools.removeDir("/usr/share/doc/libgphoto2_port")
# Remove circular symlink
pisitools.remove("/usr/include/gphoto2/gphoto2")
pisitools.dodoc("ChangeLog", "NEWS*", "README", "AUTHORS", "TESTERS", "MAINTAINERS", "HACKING")
@@ -0,0 +1,9 @@
import os
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
stale_files = ["/usr/share/hal/fdi/information/10freedesktop/10-camera-libgphoto2-device.fdi",
"/etc/udev/rules.d/60-libgphoto2.rules"]
for f in stale_files:
if os.path.exists(f):
os.unlink(f)
@@ -0,0 +1,32 @@
From 242878ac1cefd1ef99c2e5d84a794f72e49e28be Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Fri, 23 Oct 2009 13:12:16 +0200
Subject: [PATCH] Repair reattach of kernel driver if it was unbound
Drah in the header for USBDEVFS_CONNECT.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
libgphoto2_port/usb/libusb.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c
index d1535a5..c8a63f1 100644
--- a/libgphoto2_port/usb/libusb.c
+++ b/libgphoto2_port/usb/libusb.c
@@ -38,6 +38,12 @@
#include <gphoto2/gphoto2-port-result.h>
#include <gphoto2/gphoto2-port-log.h>
+#if defined(LIBUSB_HAS_GET_DRIVER_NP) && defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
+/* Pull in USBDEVFS_CONNECT */
+#include <sys/ioctl.h>
+#include <linux/usbdevice_fs.h>
+#endif
+
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
--
1.6.5.rc2
@@ -0,0 +1,14 @@
diff -up gphoto2-2.4.0/libgphoto2-2.4.0/libgphoto2_port/serial/unix.c.ixany gphoto2-2.4.0/libgphoto2-2.4.0/libgphoto2_port/serial/unix.c
--- libgphoto2-2.4.0/libgphoto2_port/serial/unix.c.ixany 2007-07-27 02:36:13.000000000 +0200
+++ libgphoto2-2.4.0/libgphoto2_port/serial/unix.c 2008-02-25 06:40:40.000000000 +0100
@@ -98,6 +98,10 @@
#define CHECK(result) {int r=(result); if (r<0) return (r);}
+#ifndef IXANY
+#define IXANY 0004000
+#endif
+
/* Linux */
#ifdef __linux__
/* devfs is accounted for in the implementation */
@@ -0,0 +1,74 @@
--- libgphoto2-2.4.1/gphoto2-config.in.pkgcfg 2007-07-27 02:36:23.000000000 +0200
+++ libgphoto2-2.4.1/gphoto2-config.in 2007-07-31 12:21:14.000000000 +0200
@@ -1,11 +1,5 @@
#! /bin/sh
-# leave these definitions here
-# they are required for correct interpolation of
-# @libdir@ and @includedir@ later on
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-
usage()
{
cat <<EOF
@@ -13,7 +7,7 @@ Usage: gphoto2-config [OPTION]
Known values for OPTION are:
- --prefix=DIR change libgphoto2 prefix [default ${prefix}]
+ --prefix print libgphoto2 prefix
--libs print library linking information
--cflags print pre-processor and compiler flags
--help display this help and exit
@@ -55,11 +49,11 @@ while test $# -gt 0; do
;;
--cflags)
- echo "-I@includedir@/gphoto2"
+ pkg-config --cflags libgphoto2
;;
--libs)
- echo "-L@libdir@" -lgphoto2 -lgphoto2_port -lm
+ pkg-config --libs libgphoto2
;;
*)
--- libgphoto2-2.4.1/libgphoto2_port/gphoto2-port-config.in.pkgcfg 2007-07-27 02:36:16.000000000 +0200
+++ libgphoto2-2.4.1/libgphoto2_port/gphoto2-port-config.in 2007-07-31 12:21:14.000000000 +0200
@@ -1,11 +1,5 @@
#! /bin/sh
-# leave these definitions here
-# they are required for correct interpolation of
-# @libdir@ and @includedir@ later on
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-
usage()
{
cat <<EOF
@@ -13,7 +7,7 @@ Usage: gphoto2-port-config [OPTION]
Known values for OPTION are:
- --prefix=DIR change libgphoto2-port prefix [default ${prefix}]
+ --prefix print libgphoto2-port prefix
--libs print library linking information
--cflags print pre-processor and compiler flags
--help display this help and exit
@@ -55,11 +49,11 @@ while test $# -gt 0; do
;;
--cflags)
- echo "-I@includedir@/gphoto2"
+ pkg-config --cflags libgphoto2_port
;;
--libs)
- echo "-L@libdir@" -lgphoto2_port
+ pkg-config --libs libgphoto2_port
;;
*)
+113
View File
@@ -0,0 +1,113 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>libgphoto2</Name>
<Homepage>http://www.gphoto.org/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>GPLv2</License>
<IsA>library</IsA>
<Summary>Library that implements support for numerous digital cameras</Summary>
<Description>libgphoto2 is the core library designed to allow access to digital camera by external programs.</Description>
<Archive sha1sum="976feb07d51026e6ca647f9fa333c500c5e0c041" type="tarbz2">mirrors://sourceforge/gphoto/libgphoto2-2.5.8.tar.bz2</Archive>
<BuildDependencies>
<Dependency>doxygen</Dependency>
<Dependency>gd-devel</Dependency>
<Dependency>tiff-devel</Dependency>
<Dependency>fontconfig-devel</Dependency>
<Dependency>libjpeg-turbo-devel</Dependency>
<Dependency>libexif-devel</Dependency>
</BuildDependencies>
</Source>
<Package>
<Name>libgphoto2</Name>
<RuntimeDependencies>
<Dependency>zlib</Dependency>
<Dependency>libxml2</Dependency>
<Dependency>libtool-ltdl</Dependency>
<Dependency>gd</Dependency>
<Dependency>tiff</Dependency>
<Dependency>libvpx</Dependency>
<Dependency>libexif</Dependency>
<Dependency>fontconfig</Dependency>
<Dependency>libjpeg-turbo</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="executable">/lib/udev</Path>
<Path fileType="doc">/usr/share/doc/libgphoto2/README</Path>
<Path fileType="doc">/usr/share/doc/libgphoto2/COPYING</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="data">/usr/share/libgphoto2</Path>
<Path fileType="data">/usr/share/hal/fdi</Path>
<Path fileType="data">/lib/udev/rules.d</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="man">/usr/share/man</Path>
</Files>
<Provides>
<COMAR script="package.py">System.Package</COMAR>
</Provides>
</Package>
<Package>
<Name>libgphoto2-docs</Name>
<Summary>Documentation for libgphoto2</Summary>
<Files>
<Path fileType="doc">/usr/share/doc/libgphoto2</Path>
<Path fileType="doc">/usr/share/doc/libgphoto2/camlibs</Path>
<Path fileType="doc">/usr/share/doc/libgphoto2/apidocs.html</Path>
<Path fileType="doc">/usr/share/doc/libgphoto2/linux-hotplug</Path>
</Files>
</Package>
<Package>
<Name>libgphoto2-devel</Name>
<Summary>Development files for libgphoto2</Summary>
<RuntimeDependencies>
<Dependency>libexif-devel</Dependency>
<Dependency release="current">libgphoto2</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/bin/gphoto2-config*</Path>
<Path fileType="executable">/usr/bin/gphoto2-port-config</Path>
<Path fileType="header">/usr/include/gphoto2</Path>
<Path fileType="data">/usr/lib/pkgconfig</Path>
<Path fileType="man">/usr/share/man/man3</Path>
</Files>
</Package>
<History>
<Update release="3">
<Date>2015-08-02</Date>
<Version>2.5.8</Version>
<Comment>Version bump.</Comment>
<Name>Ertuğrul Erata</Name>
<Email>ertugrulerata@gmail.com</Email>
</Update>
<Update release="3">
<Date>2014-05-15</Date>
<Version>2.5.4</Version>
<Comment>Version bump.</Comment>
<Name>Stefan Gronewold(groni)</Name>
<Email>groni@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2014-01-30</Date>
<Version>2.5.3.1</Version>
<Comment>Version bump.</Comment>
<Name>Stefan Gronewold(groni)</Name>
<Email>groni@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-11-16</Date>
<Version>2.5.0</Version>
<Comment>First release</Comment>
<Name>PisiLinux Community</Name>
<Email>namso-01qhotmail.it</Email>
</Update>
</History>
</PISI>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>libgphoto2</Name>
<Summary xml:lang="tr">Sayısal kamera ve müzik çalarlara erişim sağlayan kütüphane</Summary>
<Description xml:lang="tr">libgphoto2, harici uygulamalar tarafından sayısal kameralara ve müzik çalarlara erişim için kullanılan bir programlama kütüphanesidir.</Description>
<Description xml:lang="fr">Libgphoto2 est une librairie centrale conçue pour permettre aux programmes extérieurs d'accéder aux appareils photos numériques.</Description>
<Description xml:lang="es">Libgphoto2 es la librería núcleo (core) que permite a programas externos acceder a camaras digitales.</Description>
</Source>
<Package>
<Name>libgphoto2-docs</Name>
<Summary xml:lang="tr">libgphoto2 için detaylı belgelendirme</Summary>
</Package>
<Package>
<Name>libgphoto2-devel</Name>
<Summary xml:lang="tr">libgphoto2 için geliştirme dosyaları</Summary>
</Package>
</PISI>