xgtk-plugin.spec.in 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # @configure_input@
  2. Name: xgtk-plugin
  3. Summary: xgtk-plugin for graphviz
  4. Version: @VERSION@
  5. %define truerelease 1
  6. %{?distroagnostic: %define release %{truerelease}}
  7. %{!?distroagnostic: %define release %{truerelease}%{?dist}}
  8. Release: %{?release}
  9. Group: Applications/Multimedia
  10. License: CPL
  11. URL: http://www.graphviz.org/
  12. Source0: http://www.graphviz.org/
  13. # graphviz is relocatable - Caution: this feature is used in AT&T,
  14. # but probably will not be supported in Redhat/Fedora/Centos distros
  15. Prefix: /usr
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  17. BuildRequires: graphviz-devel gtk2-devel
  18. Requires: graphviz gtk2
  19. %description
  20. A graphviz plugin providind a gtk UI to graphviz.
  21. # run "dot -c" to generate plugin config in %{libdir}/graphviz/config
  22. # (don't rely on ldconfig to find libraries since it won't
  23. # help if --prefix was used to relocate binaries)
  24. # we want errors if "dot -c" in post fails
  25. %post
  26. LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
  27. # don't care so much about uninstall errors if "dot -c" in post fails
  28. # - in fact, dot may have been uninstalled before this package
  29. %postun
  30. [ -x $RPM_INSTALL_PREFIX0/bin/dot ] && LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c || :
  31. %files
  32. %defattr(-,root,root,-)
  33. %doc AUTHORS COPYING CHANGELOG.md NEWS README
  34. %dir %{_libdir}/graphviz
  35. %{_libdir}/graphviz/*.so.*
  36. %exclude %{_libdir}/graphviz/*.so
  37. #-- building --------------------------------------------------
  38. %prep
  39. %setup -q
  40. %build
  41. # XXX ix86 only used to have -ffast-math, let's use everywhere
  42. %{expand: %%define optflags %{optflags} -ffast-math}
  43. # %%configure is broken in RH7.3 rpmbuild
  44. CFLAGS="$RPM_OPT_FLAGS" \
  45. ./configure \
  46. --prefix=%{_prefix} \
  47. --bindir=%{_bindir} \
  48. --libdir=%{_libdir} \
  49. --includedir=%{_includedir} \
  50. --datadir=%{_datadir} \
  51. --mandir=%{_mandir} \
  52. --with-x \
  53. --disable-static \
  54. --disable-dependency-tracking
  55. make %{?_smp_mflags}
  56. %install
  57. make DESTDIR=%{buildroot} install
  58. find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
  59. %check
  60. %ifnarch ppc64 ppc
  61. # regression test, segfaults on ppc/ppc64, possible endian issues?
  62. # regressions tests require ksh93 - not available on centos3
  63. #cd rtest
  64. #make rtest
  65. %endif
  66. %clean
  67. # optional regression test using the products in the build tree
  68. %if 0%{?rtest}
  69. cd rtest
  70. make rtest
  71. %endif
  72. # clean up temporary installation
  73. rm -rf %{buildroot}
  74. #-- changelog --------------------------------------------------
  75. %changelog
  76. * Thu Jul 30 2009 John Ellson <[email protected]>
  77. - new package