[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-cflow] Contributing a spec file for cflow-1.0
From: |
Enrique Perez-Terron |
Subject: |
[Bug-cflow] Contributing a spec file for cflow-1.0 |
Date: |
Fri, 11 Nov 2005 19:30:45 +0100 |
User-agent: |
Opera M2/8.50 (Linux, build 1358) |
Hello,
Find inline a patch to add a spec file.
Caveats:
The spec file works for me, running Fedora Core 4 on an an old pentium iii.
I have the info file install in /usr/share/info rather than the default
/usr/info. I believe all rpm-based distributions have it this way. (I don't
know any distribution that does not have it this way, but I don't know much
about e.g. debian, gentoo or slackware.
I don't know how to make the autotools automatically adjust the program's
version and release numbers in the spec file.
Regards,
Enrique
diff -u -r -N cflow-1.0-orig/cflow.spec cflow-1.0-modified/cflow.spec
--- cflow-1.0-orig/cflow.spec 1970-01-01 01:00:00.000000000 +0100
+++ cflow-1.0-modified/cflow.spec 2005-11-11 19:07:26.000000000 +0100
@@ -0,0 +1,60 @@
+Summary: Print a graph, charting control flow within a collection of C source
files
+Name: cflow
+Version: 1.0
+Release: 1
+License: GPL
+Group: Development/Tools
+URL: http://www.gnu.org/software/cflow/
+Source0: %{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+%define infodir /usr/share/info
+
+%description
+GNU cflow analyzes a collection of C source files and prints a graph,
+charting control flow within the program.
+
+GNU cflow is able to produce both direct and inverted flowgraphs for C sources.
+Optionally a cross-reference listing can be generated.
+Two output formats are implemented: POSIX and GNU (extended).
+
+Input files can optionally be preprocessed before analyzing.
+
+The package also provides Emacs major mode for examining the produced
flowcharts in Emacs.
+
+%prep
+%setup -q
+
+%build
+./configure --prefix=/usr --infodir=%{infodir}
+make
+
+%install
+if [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ]; then
+ rm -rf $RPM_BUILD_ROOT
+ mkdir -p -m 775 $RPM_BUILD_ROOT
+ make DESTDIR=$RPM_BUILD_ROOT install
+ rm -f $RPM_BUILD_ROOT/%{infodir}/dir
+fi
+
+%post
+install-info --info-dir="%{infodir}" "%{infodir}/cflow.info"
+
+%clean
+if [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ]; then
+ rm -rf $RPM_BUILD_ROOT
+fi
+
+%files
+%defattr(-,root,root,-)
+%doc ABOUT-NLS AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO
+%{_bindir}/cflow
+%{infodir}/cflow.info.gz
+%{_datadir}/emacs/site-lisp/cflow-mode.el
+%{_datadir}/locale/pl/LC_MESSAGES/cflow.mo
+%{_datadir}/locale/uk/LC_MESSAGES/cflow.mo
+
+%changelog
+* Fri Nov 11 2005 <address@hidden> -
+- Initial build.
+
- [Bug-cflow] Contributing a spec file for cflow-1.0,
Enrique Perez-Terron <=