diff options
author | Hans Ulrich Niedermann <gp@n-dimensional.de> | 2001-10-27 17:36:42 +0000 |
---|---|---|
committer | Hans Ulrich Niedermann <gp@n-dimensional.de> | 2001-10-27 17:36:42 +0000 |
commit | 071dd298668518173ec74c88770cee5a4800ee4e (patch) | |
tree | 47e569ae7db746e96fb8ca2293ec0e6a211c5246 /packaging/rpm/package.spec.in | |
parent | 065de7af79710c2c184546a240308fcf33a5ab87 (diff) | |
download | libgphoto2-071dd298668518173ec74c88770cee5a4800ee4e.tar.gz |
2001-10-26 Hans Ulrich Niedermann <gp@n-dimensional.de>
* Makefile.am: moved spec file to packaging/rpm/
* Makefile.am: added CDPATH warning, rpm target and cvs-tags target
* gphoto.spec.in: moved spec file to packaging/rpm/
* configure.in: added packaging/rpm/Makefile.am
* configure.in: moved spec file to packaging/rpm/
* packaging/Makefile.am: added rpm/
* packaging/rpm/: new directory with Makefile.am and .cvsignore
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2804 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'packaging/rpm/package.spec.in')
-rw-r--r-- | packaging/rpm/package.spec.in | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/packaging/rpm/package.spec.in b/packaging/rpm/package.spec.in new file mode 100644 index 000000000..8d9fd26ad --- /dev/null +++ b/packaging/rpm/package.spec.in @@ -0,0 +1,184 @@ +Summary: Software for accessing digital cameras +Name: @PACKAGE@ +Version: @VERSION@ +Release: 2 +License: LGPL +Group: Applications/Multimedia +BuildRoot: %{_tmppath}/%{name}-%{version}-root +Source: http://www.gphoto.org/dist/@PACKAGE@-@VERSION@.tar.gz +Url: http://www.gphoto.org/ +Requires: libusb >= 0.0.4 +PreReq: hotplug +Provides: libgphoto2 +BuildRequires: libusb-devel +BuildRequires: gtk-doc +BuildRequires: findutils perl + +######################################################################## +# TODO about packaging +######################################################################## +# +# * review RPM packaging for gphoto2, libusb, gtkam +# * make rpm -Fvh, rpm -Uvh work with /etc/hotplug/usb.usermap +# +######################################################################## + +%description +The gPhoto2 project is a universal, free application and library +framework that lets you download images from several different +digital camera models, including the newer models with USB +connections. Note that +a) for some older camera models you must use the old "gphoto" package. +b) for USB mass storage models you must use the driver in the kernel + +This package contains +i) the library that digital camera applications can use +ii) the command-line utility gphoto2 + +Other (GUI) frontends are available seperately. + +%package devel +Summary: Headers and links to compile against the libgphoto2 library. +Requires: %{name} = %{version} +Provides: libgphoto2-devel +Group: Development/Libraries + +%description devel +The gPhoto2 project is a universal, free application and library +framework that lets you download images from several different +digital camera models, including the newer models with USB +connections. Note that for some older camera models you must use +the old "gphoto" package. + +This package contains the files needed to compile applications that +use libgphoto2. + +%prep +rm -rf $RPM_BUILD_DIR/%{name}-%{version} +%setup -q -n %{name}-%{version} + +%build +CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; +CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; +FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; +%{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} ; +./configure %{_target_platform} \ + --prefix=%{_prefix} \ + --exec-prefix=%{_exec_prefix} \ + --bindir=%{_bindir} \ + --sbindir=%{_sbindir} \ + --sysconfdir=%{_sysconfdir} \ + --datadir=%{_datadir} \ + --includedir=%{_includedir} \ + --libdir=%{_libdir} \ + --libexecdir=%{_libexecdir} \ + --localstatedir=%{_localstatedir} \ + --sharedstatedir=%{_sharedstatedir} \ + --mandir=%{_mandir} \ + --infodir=%{_infodir} \ + --with-html-dir=%{_docdir}/%{name}-%{version}/html +make + +%install +rm -rf $RPM_BUILD_ROOT + +make DESTDIR=%{buildroot} \ + prefix=%{_prefix} \ + exec_prefix=%{_exec_prefix} \ + bindir=%{_bindir} \ + sbindir=%{_sbindir} \ + sysconfdir=%{_sysconfdir} \ + datadir=%{_datadir} \ + docdir=%{_docdir}/%{name}-%{version} \ + includedir=%{_includedir} \ + libdir=%{_libdir} \ + libexecdir=%{_libexecdir} \ + localstatedir=%{_localstatedir} \ + sharedstatedir=%{_sharedstatedir} \ + mandir=%{_mandir} \ + infodir=%{_infodir} \ +install + +install -d -m755 %{buildroot}/etc/hotplug/usb/ +install -m755 packaging/usbcam.console %{buildroot}/etc/hotplug/usb/usbcam + +find %{buildroot} -type f | sed 's!^%{buildroot}!!' | sort > %{name}-%{version}.files + +%clean +rm -rf $RPM_BUILD_ROOT + + +##### gphoto2 +%files +%defattr(-,root,root) +%{_bindir}/gphoto2 +%{_datadir}/gphoto2/konica/* +%doc doc/gphoto2.txt doc/gphoto2-cli.txt +%doc AUTHORS README COPYING NEWS +%docdir doc/api/html +%docdir libgphoto2_port/doc/html +%{_libdir}/libgphoto2.* +%{_libdir}/gphoto2/* +%{_libdir}/libgphoto2_port.* +%{_libdir}/gphoto2_port/* +%{_libdir}/gphoto2portConf.sh +%{_datadir}/locale/de/LC_MESSAGES/gphoto.mo +%{_libdir}/pkgconfig/libgphoto-2.0.pc +/etc/hotplug/usb/usbcam + +# +# FIXME: When updating from one RPM to a newer one, +# the cams get (correctly) removed from usb.usermap but not +# added again. +# + +%post +# add supported cameras to /etc/hotplug/usb.usermap +grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.tmp +gphoto2 --print-usb-usermap >> /etc/hotplug/usb.usermap.tmp +mv /etc/hotplug/usb.usermap.tmp /etc/hotplug/usb.usermap +# register libraries +/sbin/ldconfig + +%postun +# unregister libraries +/sbin/ldconfig +# remove supported cameras from /etc/hotplug/usb.usermap +grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.tmp +mv /etc/hotplug/usb.usermap.tmp /etc/hotplug/usb.usermap + +%files devel +%defattr(-,root,root) +%docdir %{_docdir}/%{name}-%{version}/html +%{_bindir}/gphoto2-config +%{_bindir}/gphoto2-port-config +%{_includedir}/gphoto2/* + + +##### Change log +%changelog +* Sat Oct 27 2001 Hans Ulrich Niedermann <gp@n-dimensional.de> +- tried to fix update behaviour for hotplug list + +* Thu Oct 25 2001 Tim Waugh <twaugh@redhat.com> +- hotplug dependency is a prereq not a requires (the package scripts + need it) + +* Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de> +- integrated spec file into source package + +* Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de> +- 2.0beta3 + +* Tue Oct 2 2001 Tim Waugh <twaugh@redhat.com> 2.0beta2-0.1 +- Adapted for Red Hat Linux. +- 2.0beta2. + +* Mon Aug 6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.2mdk +- Corrected "Requires:" + +* Mon Aug 6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.1mdk +- Initial release + + + |