]> granicus.if.org Git - graphviz/commitdiff
add "make rpm" target
authorellson <devnull@localhost>
Thu, 30 Jul 2009 17:22:26 +0000 (17:22 +0000)
committerellson <devnull@localhost>
Thu, 30 Jul 2009 17:22:26 +0000 (17:22 +0000)
plugin.demo/xgtk/Makefile.am
plugin.demo/xgtk/configure.ac
plugin.demo/xgtk/xgtk-plugin.spec.in [new file with mode: 0644]

index 2d304a7f7f1d9090a7c68165a57f7f64fa2939a0..cb0badd8593f5eab943dc4b2daca2e216511bfbd 100644 (file)
@@ -1,3 +1,8 @@
 ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS=src
+
+.PHONY: rpm
+rpm: dist
+       rpmbuild -ta xgtk-plugin-@VERSION@.tar.gz
+
index 9a53f7e27f3b2c82041e215f813eab5937b3e511..bec81bb6db336101ffbea0b39a140fa95b16b493 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.63])
-AC_INIT([gtk-plugin], [0.1], [ellson@research.att.com])
+AC_INIT([xgtk-plugin], [0.1], [ellson@research.att.com])
 AC_CONFIG_SRCDIR([src/gvplugin_gtk.c])
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_HEADERS([config.h])
@@ -74,5 +74,5 @@ AC_CHECK_HEADERS([inttypes.h libintl.h stdint.h string.h unistd.h])
 
 # Checks for library functions.
 
-AC_CONFIG_FILES([Makefile src/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile xgtk-plugin.spec])
 AC_OUTPUT
diff --git a/plugin.demo/xgtk/xgtk-plugin.spec.in b/plugin.demo/xgtk/xgtk-plugin.spec.in
new file mode 100644 (file)
index 0000000..abb33a3
--- /dev/null
@@ -0,0 +1,103 @@
+# $Id$ $Revision$
+# @configure_input@
+
+Name:    xgtk-plugin
+Summary: xgtk-plugin for graphviz
+Version: @VERSION@
+
+%define truerelease 1
+%{?distroagnostic: %define release %{truerelease}}
+%{!?distroagnostic: %define release %{truerelease}%{?dist}}
+
+Release: %{?release}
+
+Group:   Applications/Multimedia
+License: CPL
+URL:     http://www.graphviz.org/
+Source0: http://www.graphviz.org/pub/@GRAPHVIZ_SOURCES@/xgtk-plugin-@VERSION@.tar.gz
+
+BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: graphviz-devel gtk2-devel
+
+Requires(post):   /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+A graphviz plugin providind a gtk UI to graphviz.  
+
+# run "dot -c" to generate plugin config in %{libdir}/graphviz/config
+# (don't rely on ldconfig to find libraries since it won't
+#  help if --prefix was used to relocate binaries)
+%post
+LD_LIBRARY_PATH=$RPM_INSTALL_PREFIX0/%{_lib} $RPM_INSTALL_PREFIX0/bin/dot -c
+/sbin/ldconfig
+
+# if there is no dot after everything else is done, then remove config
+%postun
+if [ $1 -eq 0 ]; then
+        rm -f $RPM_INSTALL_PREFIX0/%{_lib}/graphviz/config || :
+fi
+/sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING ChangeLog NEWS README
+%dir %{_libdir}/graphviz
+%{_libdir}/graphviz/*.so.*
+
+#-- building --------------------------------------------------
+
+%prep
+%setup -q
+
+%build
+# XXX ix86 only used to have -ffast-math, let's use everywhere
+%{expand: %%define optflags %{optflags} -ffast-math}
+
+# %%configure is broken in RH7.3 rpmbuild
+CFLAGS="$RPM_OPT_FLAGS" \
+./configure \
+        --prefix=%{_prefix} \
+        --bindir=%{_bindir} \
+        --libdir=%{_libdir} \
+        --includedir=%{_includedir} \
+        --datadir=%{_datadir} \
+        --mandir=%{_mandir} \
+        --with-x \
+       --disable-static \
+        --disable-dependency-tracking \
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot} __doc
+make DESTDIR=%{buildroot} \
+        docdir=%{buildroot}%{_docdir}/%{name} \
+        pkgconfigdir=%{_libdir}/pkgconfig \
+        install
+find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
+chmod -x %{buildroot}%{_datadir}/%{name}/lefty/*
+cp -a %{buildroot}%{_datadir}/%{name}/doc __doc
+rm -rf %{buildroot}%{_datadir}/%{name}/doc
+
+%check
+%ifnarch ppc64 ppc
+# regression test, segfaults on ppc/ppc64, possible endian issues?
+# regressions tests require ksh93 - not available on centos3
+#cd rtest
+#make rtest
+%endif
+
+%clean
+# optional regression test using the products in the build tree
+%if 0%{?rtest}
+cd rtest
+make rtest
+%endif
+# clean up temporary installation
+rm -rf %{buildroot}
+
+#-- changelog --------------------------------------------------
+
+%changelog
+* Thu Jul 30 2009 John Ellson <ellson@research.att.com>
+- new package