Package init
This commit is contained in:
parent
8a19fb7b26
commit
0739cac364
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# libgphoto2
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
||||
# libgphoto2
|
||||
|
||||
#### 介绍
|
||||
{**以下是码云平台说明,您可以替换此简介**
|
||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 码云特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
32
gphoto2-device-return.patch
Normal file
32
gphoto2-device-return.patch
Normal file
@ -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
|
||||
|
||||
74
gphoto2-pkgcfg.patch
Normal file
74
gphoto2-pkgcfg.patch
Normal file
@ -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
|
||||
;;
|
||||
|
||||
*)
|
||||
BIN
libgphoto2-2.5.18.tar.bz2
Normal file
BIN
libgphoto2-2.5.18.tar.bz2
Normal file
Binary file not shown.
111
libgphoto2.spec
Normal file
111
libgphoto2.spec
Normal file
@ -0,0 +1,111 @@
|
||||
Name: libgphoto2
|
||||
Summary: library for giving access to literally hundreds of digital cameras
|
||||
Version: 2.5.18
|
||||
Release: 3
|
||||
License: GPLv2+ and GPLv2
|
||||
URL: http://www.gphoto.org/
|
||||
Source0: http://downloads.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2
|
||||
|
||||
Patch1: gphoto2-pkgcfg.patch
|
||||
Patch2: gphoto2-device-return.patch
|
||||
|
||||
BuildRequires: gcc gcc-c++ make systemd libtool-ltdl-devel libjpeg-devel gd-devel
|
||||
BuildRequires: pkgconfig(libxml-2.0) pkgconfig(libexif) lockdev-devel pkgconfig(libusb-1.0)
|
||||
|
||||
Requires: lockdev
|
||||
|
||||
%description
|
||||
%{name} is the core of gphoto2 software. It is a portable library
|
||||
which gives access to literally hundreds of digital cameras.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Provides: gphoto2-devel = %{version}-%{release}
|
||||
Obsoletes: gphoto2-devel < 2.4.0-11
|
||||
|
||||
%description devel
|
||||
%{name} Library Header Files and Link Libraries
|
||||
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
for f in AUTHORS ChangeLog COPYING %{name}_port/AUTHORS %{name}_port/COPYING.LIB `find -name 'README.*'`; do
|
||||
iconv -f ISO-8859-1 -t UTF-8 $f > $f.conv
|
||||
mv -f $f.conv $f
|
||||
done
|
||||
|
||||
%build
|
||||
%configure \
|
||||
udevscriptdir='%(pkg-config --variable=udevdir udev)' \
|
||||
--with-drivers=all \
|
||||
--with-doc-dir=%{_pkgdocdir} \
|
||||
--disable-rpath \
|
||||
--disable-static \
|
||||
%{nil}
|
||||
|
||||
%disable_rpath %{name}_port/libtool
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install INSTALL="install -p" mandir=%{_mandir}
|
||||
|
||||
pushd packaging/linux-hotplug/
|
||||
export LIBDIR=${RPM_BUILD_ROOT}%{_libdir}
|
||||
export CAMLIBS=${RPM_BUILD_ROOT}%{_libdir}/%{name}/%{version}
|
||||
export LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir}
|
||||
install -d ${RPM_BUILD_ROOT}%{_udevrulesdir}
|
||||
${RPM_BUILD_ROOT}%{_libdir}/%{name}/print-camera-list udev-rules version 136 > ${RPM_BUILD_ROOT}%{_udevrulesdir}/40-%{name}.rules
|
||||
popd
|
||||
|
||||
find ${RPM_BUILD_ROOT} -type f -name "*.la" -print -delete
|
||||
|
||||
%find_lang %{name}-6
|
||||
%find_lang %{name}_port-12
|
||||
cat %{name}*.lang >> %{name}.lang
|
||||
|
||||
mkdir __doc
|
||||
cp -a ${RPM_BUILD_ROOT}%{_pkgdocdir}/* __doc
|
||||
|
||||
%files -f %{name}.lang
|
||||
%license COPYING
|
||||
%dir %{_libdir}/%{name}/
|
||||
%dir %{_libdir}/%{name}/%{version}/
|
||||
%dir %{_libdir}/%{name}_port/
|
||||
%dir %{_libdir}/%{name}_port/0.12.0/
|
||||
%{_libdir}/%{name}.so.*
|
||||
%{_libdir}/%{name}_port.so.*
|
||||
%{_libdir}/%{name}/%{version}/*.so
|
||||
%{_libdir}/%{name}_port/0.12.0/*.so
|
||||
%{_udevrulesdir}/40-%{name}.rules
|
||||
%(pkg-config --variable=udevdir udev)/check-ptp-camera
|
||||
%{_datadir}/%{name}/
|
||||
%exclude %{_includedir}/gphoto2/gphoto2
|
||||
%exclude %{_libdir}/%{name}/print-camera-list
|
||||
%exclude %{_pkgdocdir}
|
||||
%exclude %{_datadir}/%{name}_port/*/vcamera/
|
||||
|
||||
%files devel
|
||||
%{_bindir}/gphoto2-config
|
||||
%{_bindir}/gphoto2-port-config
|
||||
%{_libdir}/%{name}.so
|
||||
%{_libdir}/%{name}_port.so
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{_libdir}/pkgconfig/%{name}_port.pc
|
||||
%{_includedir}/gphoto2/
|
||||
|
||||
%files help
|
||||
%{_mandir}/man3/%{name}.3*
|
||||
%{_mandir}/man3/%{name}_port.3*
|
||||
%doc AUTHORS README.md NEWS
|
||||
%doc __doc/*
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Wed Nov 20 2019 caomeng<caomeng5@huawei.com> - 2.5.18-3
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user