# # rpm spec file for testing nedit syntax highlighting # # Volker Kuhlmann # 05, 08, 19 Nov 2011 # #norootforbuild %define mymacro1 text1 %define mymacro2 text2 %undefine mymacro1 %undefine mymacro2 Summary: summary text Name: packagename Version: 1.0 Release: 1 License: GPL V2 Group: Development/Tools/whatever Source: %{name}-%{version}.tar.bz2 Source2: sourcefile2.tar.bz2 Patch: patch_0.diff Patch2: patch_2.diff URL: http://inter.net/location Buildroot: %{_tmppath}/%{name}-%{version}-root BuildRequires: libtool libftdi1-devel tcl texinfo texlive asciidoc git Requires: libftdi1 tcl PreReq: %install_info_prereq %description Descriptive test of what the package does. Descriptive test of what the package does. Descriptive test of what the package does. Descriptive test of what the package does. Percent %%string in description. %prep %setup -q %setup2 %patch %patch2 -p1 %build #autoconf #aclocal #automake # Configure the package with the required options CFLAGS="$RPM_BUILD_FLAGS" \ ./configure \ --prefix=%{_prefix} \ --exec-prefix=%{_prefix} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --docdir=%{_docdir} \ --enable-this \ --disable-that # Make the package %{__make} %{?jobs:-/j%{jobs}} %{__make} html %{__make} pdf %if 1 cmd1 %else cmd2 %endif # Conditionals and macro expansion (all legal constructs) %if %{macro1} %if ! %{macro1} %if 00000%{?macro2} %if ! 0%?macro2 %if 0%!?macro2 %if ! 0%!?macro2 %else %endif %install # Install the package %{makeinstall} install-html install-pdf # WARNING: Shell comments do not prevent macros from being expanded! #%define macro1 definition1 #%if %macro1 echo Y %else echo N %endif %if 0 # Note: # Don't use '%' in comments, or only with caution. # A space following % files is safe, as is %%files. # But legal constructs like %{mymacro} or %mymacro2 or %if # can cause trouble. # htmldir=% {_docdir}/%{name} pdfdir=%{_docdir}/%{name} %endif %post %install_info --info-dir=%_infodir %_infodir/%name.info*.gz %postun %install_info_delete --info-dir=%_infodir %_infodir/%name.info*.gz %clean # clean up all #make clean #make distclean %files %defattr(644,root,root) %doc AUTHORS BUGS ChangeLog COPYING HACKING NEWS PATCHES.txt README %doc %{_docdir}/myfiles.* %doc %{_mandir}/man*/* %doc %{_infodir}/*.info* %docdir %{_docdir}/mymanual/ %defattr(755,root,root) %{_bindir}/* %attr(1750,root,mygroup) %{_sbindir}/oneprog %defattr(644,root,root) %{_libdir}/prog/ %{_libdir}/libprog.* %{_datadir}/prog/ %exclude %{_includedir}/* %exclude %{_infodir}/dir %changelog * Sat Nov 05 2011 - Volker Kuhlmann - Created rpm test spec file. - Percent %%string in changelog.