"Fossies" - the Fresh Open Source Software Archive

Member "libgphoto2-2.5.27/packaging/rpm/libgphoto2.spec" (21 Feb 2021, 11232 Bytes) of package /linux/privat/libgphoto2-2.5.27.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) RPM Spec source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "libgphoto2.spec": 2.5.26_vs_2.5.27.

    1 ########################################################################
    2 #
    3 # $Id$
    4 #
    5 # RPM spec file for libgphoto2
    6 #
    7 # TODO list concerning packaging
    8 # - review and coordinate RPM packaging for libgphoto2, gphoto2, gtkam
    9 #
   10 ########################################################################
   11 
   12 %define debug_package %{nil}
   13 
   14 ####################################
   15 Summary: Software for accessing digital cameras
   16 Name: libgphoto2
   17 Version: 2.5.27
   18 Release: 2
   19 License: LGPL
   20 Group: Applications/Multimedia
   21 BuildRoot: %{_tmppath}/%{name}-%{version}-root
   22 # sources only available from sf.net - but not wgettable.
   23 # Source: http://www.gphoto.org/dist/libgphoto2-2.5.27.tar.gz
   24 Source: http://prdownloads.sourceforge.net/gphoto/libgphoto2-2.5.27.tar.gz
   25 Url: http://www.gphoto.org/
   26 ExcludeArch: s390 s390x
   27 Provides: libgphoto2
   28 Provides: libgphoto2_port
   29 Requires: libgphoto2_port
   30 # absolute requirements
   31 PreReq: hotplug >= 2001_04_24-13
   32 PreReq: /sbin/ldconfig, grep, fileutils
   33 BuildRequires: findutils perl
   34 
   35 # the following requirements are optional
   36 #BuildRequires: gtk-doc
   37 Requires: libusb >= 0.1.8
   38 BuildRequires: libusb-devel >= 0.1.8
   39 
   40 ####################################
   41 %description
   42 The gPhoto2 project is a universal, free application and library
   43 framework that lets you download images from several different
   44 digital camera models, including the newer models with USB
   45 connections. Note that
   46 a) for some older camera models you must use the old "gphoto" package.
   47 b) for USB mass storage models you must use the driver in the kernel
   48 
   49 This libgphoto2 package contains only the library that digital 
   50 camera applications can use.
   51 
   52 Frontend like the command-line utility gphoto2 and other (GUI)
   53 frontends are available separately.
   54 
   55 ####################################
   56 %package devel
   57 Summary: Headers and libraries to compile against the libgphoto2 library.
   58 Requires: %{name} = %{version}
   59 Provides: libgphoto2-devel
   60 Provides: libgphoto2_port-devel
   61 Group: Development/Libraries
   62 
   63 ####################################
   64 %description devel
   65 The gPhoto2 project is a universal, free application and library
   66 framework that lets you download images from several different
   67 digital camera models, including the newer models with USB
   68 connections. Note that
   69 a) for some older camera models you must use the old "gphoto" package.
   70 b) for USB mass storage models you must use the driver in the kernel
   71 
   72 This libgphoto2-devel package contains the files needed to compile 
   73 frontends like the command-line utility gphoto2 and other (GUI)
   74 frontends, which are available separately.
   75 
   76 
   77 ########################################################################
   78 # Building and installing the beast into %%{buildroot}
   79 ########################################################################
   80 
   81 ####################################
   82 %prep
   83 rm -rf "${RPM_BUILD_DIR}/%{name}-%{version}"
   84 %setup -q -n %{name}-%{version}
   85 
   86 ####################################
   87 %build
   88 %define __libtoolize :
   89 # FIXME: We should copy the disable- arguments here
   90 ##FIXMEPERCENTconfigure --enable-docs --with-docs-dir=%{buildroot}%{_docdir}/%{name}
   91 %configure --with-docs-dir=%{buildroot}%{_docdir}/%{name}
   92 make
   93 
   94 ####################################
   95 %install
   96 rm -rf "${RPM_BUILD_ROOT}"
   97 
   98 # Convince gphoto2 to be packaged.
   99 perl -p -i -e "s|^libdir.*|libdir='$RPM_BUILD_ROOT%{_libdir}'|g" \
  100     libgphoto2_port/libgphoto2_port/libgphoto2_port.la
  101 
  102 %makeinstall
  103 
  104 # Fix up libtool libraries.
  105 find $RPM_BUILD_ROOT -name '*.la' | \
  106   xargs perl -p -i -e "s|$RPM_BUILD_ROOT||g"
  107 
  108 #cp -a %{buildroot}%{_docdir}/%{name}-%{version}/html html
  109 #cp -a %{buildroot}%{_docdir}/libgphoto2_port-0.5.1/html/api/gphoto2-port html/api
  110 #find html -name '*.sgml' | xargs rm
  111 
  112 
  113 %find_lang libgphoto2-6
  114 # FIXME: Update this manually as long as libgphoto2_port has a
  115 #        different build system.
  116 %find_lang libgphoto2_port-0
  117 
  118 # build file list
  119 find %{buildroot} -type f -or -type l \
  120         | sed 's!^%{buildroot}!!' | sort > %{name}-%{version}.all.files
  121 
  122 # extract .so libs
  123 egrep '\.so(\.[0-9]+)*$' \
  124     < %{name}-%{version}.all.files > %{name}-%{version}.so.files
  125 egrep -v '\.so(\.[0-9]+)*$' \
  126     < %{name}-%{version}.all.files > %{name}-%{version}.no-so.files
  127 
  128 # extract files for devel package
  129 egrep '(-config|\.h|\.la|\.a|\.pc|\.3)$' \
  130     < %{name}-%{version}.no-so.files > %{name}-%{version}.devel.files
  131 egrep -v '(-config|\.h|\.la|\.a|\.pc|\.3)$' \
  132     < %{name}-%{version}.no-so.files > %{name}-%{version}.no-devel.files
  133 
  134 # extract doc files
  135 egrep '^%{_docdir}' \
  136     < %{name}-%{version}.no-devel.files > %{name}-%{version}.doc.files
  137 egrep -v '^%{_docdir}' \
  138     < %{name}-%{version}.no-devel.files > %{name}-%{version}.no-doc.files
  139 
  140 # extract i18n files
  141 egrep '^%{_datadir}/locale' \
  142     < %{name}-%{version}.no-doc.files > %{name}-%{version}.i18n.files
  143 egrep -v '^%{_datadir}/locale' \
  144     < %{name}-%{version}.no-doc.files > %{name}-%{version}.no-i18n.files
  145 
  146 # extract misc files for lib package
  147 egrep '^(%{_libdir}|%{_datadir})/libgphoto2' \
  148     < %{name}-%{version}.no-i18n.files > %{name}-%{version}.misc.files
  149 egrep -v '^(%{_libdir}|%{_datadir})/libgphoto2' \
  150     < %{name}-%{version}.no-i18n.files > %{name}-%{version}.rest.files \
  151     || echo "non-zero exit code is not fatal here"
  152 
  153 if [ -s %{name}-%{version}.rest.files ]
  154 then
  155     cat %{name}-%{version}.rest.files
  156 fi
  157 
  158 cat %{name}-%{version}.{so,doc,misc,i18n}.files \
  159     > %{name}-%{version}.files
  160 
  161 # HACK
  162 touch debugfiles.list
  163 
  164 exit 0
  165 
  166 ####################################
  167 %clean
  168 # FIXME: Cleanup deactiveated for debugging
  169 # rm -rf "${RPM_BUILD_ROOT}"
  170 
  171 ########################################################################
  172 # file list and installation for main package
  173 ########################################################################
  174 
  175 ####################################
  176 %files -f %{name}-%{version}.files
  177 %defattr(-,root,root)
  178 # FIXME: correct %docxyz markup for doc files
  179 
  180 ####################################
  181 %post
  182 
  183 # register libraries
  184 /sbin/ldconfig
  185 
  186 # add supported cameras to /etc/hotplug/usb.usermap
  187 grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.tmp
  188 %{_libdir}/libgphoto2/print-usb-usermap >> /etc/hotplug/usb.usermap.tmp
  189 mv /etc/hotplug/usb.usermap.tmp /etc/hotplug/usb.usermap
  190 
  191 ####################################
  192 %postun
  193 
  194 # unregister libraries
  195 /sbin/ldconfig
  196 
  197 if [ "$1" = 0 ]; then
  198     # remove supported cameras from /etc/hotplug/usb.usermap
  199     # if erasing the package not as part of a package update
  200     grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.new
  201     mv /etc/hotplug/usb.usermap.new /etc/hotplug/usb.usermap
  202 fi
  203 
  204 
  205 ########################################################################
  206 # file list and installation for -devel subpackage
  207 ########################################################################
  208 
  209 ####################################
  210 %files devel -f %{name}-%{version}.devel.files
  211 %defattr(-,root,root)
  212 #%doc html/api
  213 
  214 
  215 ########################################################################
  216 # ChangeLog
  217 ########################################################################
  218 %changelog
  219 * Thu Jun 20 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.1.4head
  220 - hack in correct find_lang arguments
  221 - fix misc. nagging little things preventing "rpmbuild -ta" from working
  222 
  223 * Thu Jun 20 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.1.0rc3-1
  224 - only --enable-docs and copy API docs if GTK_DOC found
  225 - use --with-doc-formats from local ./configure call
  226 
  227 * Tue May 28 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.0.1dev8-1
  228 - comment out requirements if not used (gtk-doc, transfig)
  229 - provide libgphoto2_port - for future compatibility
  230 - fixed handling of misc HTML docs (API docs and docbook-generated manual)
  231 - install linux-hotplug scripts into a directory of that name
  232 - added gphoto2_port(3) man page
  233 
  234 * Sat May 18 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.0.1dev6-1
  235 - added API HTML docs to the -devel package
  236 - added man page gphoto2(3), require hotplug >= 2001_04_24-13
  237 
  238 * Thu May  9 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.0.1dev4-1
  239 - merged changes from current Redhat spec file into gphoto2 distribution
  240   as they managed to get the beast to build
  241 - re-added FAQ to package (Redhat left it out regrettably)
  242 - only require hotplug 2001_04_24-11 instead of 2001_04_24-13
  243 
  244 * Mon Apr 29 2002 Tim Waugh <twaugh@redhat.com> 2.0-6
  245 - In fact, don't even build for mainframe.
  246 
  247 * Mon Apr 29 2002 Florian La Roche <Florian.LaRoche@redhat.de> 2.0-5
  248 - do not require hotplug for mainframe
  249 
  250 * Mon Apr 15 2002 Nalin Dahyabhai <nalin@redhat.com> 2.0-4
  251 - Set the owner of the device to the console lock holder, not the owner
  252   of /dev/console, in the hotplug agent, fixing access for users who log
  253   in at VTs and use startx (#62976).
  254 
  255 * Fri Apr 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-3
  256 - Rebuild (fixed bug #63355).
  257 
  258 * Sat Apr 06 2002 Hans Ulrich Niedermann <gp@n-dimensional.de>
  259 - require libusb >= 0.0.5 and for building require transfig
  260 
  261 * Wed Feb 27 2002 Tim Waugh <twaugh@redhat.com> 2.0-2
  262 - Fix from CVS: close port unconditionally in gp_camera_exit().
  263 
  264 * Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-1
  265 - 2.0 is released.
  266 - Ship the .so symlinks in the devel package.
  267 
  268 * Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc4.1
  269 - 2.0rc4.
  270 
  271 * Fri Feb 22 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc3.1
  272 - 2.0rc3.  No longer need CVS patch.
  273 - Build no longer requires xmlto.
  274 
  275 * Thu Feb 21 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.2
  276 - Fix DC240 hangs (patch from CVS).
  277 - Rebuild in new environment.
  278 
  279 * Tue Feb 19 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.1
  280 - 2.0rc2 (bug #59993).  No longer need docs patch or man page.
  281 - Really fix up libtool libraries (bug #60002).
  282 
  283 * Fri Feb 15 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.2
  284 - PreReq /sbin/ldconfig, grep, and fileutils (bug #59941).
  285 
  286 * Tue Feb 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.1
  287 - 2.0beta5.
  288 - Fix Makefiles so that documentation can be built.
  289 - Ship pkgconfig file.
  290 - Add man page.
  291 
  292 * Thu Feb  7 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta4.1
  293 - 2.0beta4.
  294 - Build requires transfig, and at least version 0.1.5 of libusb.
  295 - Clean up file lists.
  296 - Build documentation.
  297 
  298 * Fri Jan 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.2
  299 - Rebuild in new environment.
  300 - Dump docbook-dtd30-sgml requirement; gtk-doc is sufficient.
  301 
  302 * Sun Nov 18 2001 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.1
  303 - Adapted for Red Hat Linux.
  304 
  305 * Sat Oct 27 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
  306 - fixed update behaviour for hotplug list (do not erase it when updating)
  307 
  308 * Thu Oct 25 2001 Tim Waugh <twaugh@redhat.com>
  309 - hotplug dependency is a prereq not a requires (the package scripts
  310   need it)
  311 
  312 * Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
  313 - integrated spec file into source package
  314 
  315 * Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
  316 - 2.0beta3
  317 
  318 * Tue Oct  2 2001 Tim Waugh <twaugh@redhat.com> 2.0beta2-0.1
  319 - Adapted for Red Hat Linux.
  320 - 2.0beta2.
  321 
  322 * Mon Aug  6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.2mdk
  323 - Corrected "Requires:"
  324 
  325 * Mon Aug  6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.1mdk
  326 - Initial release
  327 
  328 
  329 
  330 ########################################################################
  331 # Local Variables:
  332 # mode: rpm-spec
  333 # End: