From f0cd5dbdd92e51ed0bdc56e3496f11f54c68c66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Tue, 10 Jul 2012 12:39:47 +0000 Subject: [PATCH] rpmbuild should work now; refs #2 --- configure.in | 2 +- doc/examples/makefile.am | 4 +++- makefile.am | 11 ++++++----- mrw-c++.spec.in | 12 +++++++----- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/configure.in b/configure.in index 50486be..93bf85f 100644 --- a/configure.in +++ b/configure.in @@ -264,7 +264,7 @@ AM_CONDITIONAL(MINGW32, test "$MINGW32" = "yes") AM_CONDITIONAL(MAC, test "$MAC" = "yes") # export macros -RPMBUILD=${BUILD_NUMBER} +RPMBUILD=${BUILD_NUMBER:-1} AC_SUBST(RPMBUILD) SRCDIR=${srcdir} AC_SUBST(SRCDIR) diff --git a/doc/examples/makefile.am b/doc/examples/makefile.am index 54c5c0f..a05446e 100644 --- a/doc/examples/makefile.am +++ b/doc/examples/makefile.am @@ -3,7 +3,9 @@ ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 -noinst_PROGRAMS = exceptionhandling smartpointer +exampledir = ${docdir}/examples +example_PROGRAMS = exceptionhandling smartpointer +example_DATA = ${smartpointer_SOURCES} ${exceptionhandling_SOURCES} exceptionhandling_SOURCES = exceptionhandling.cxx exceptionhandling_CPPFLAGS = -I${top_srcdir}/src diff --git a/makefile.am b/makefile.am index 574a12e..5801d2e 100644 --- a/makefile.am +++ b/makefile.am @@ -13,7 +13,7 @@ SUBDIRS = @SRC_DIR@ @TST_DIR@ @DOC_DIR@ -nobase_include_HEADERS = +doc_DATA = AUTHORS COPYING ChangeLog NEWS README INSTALL EXTRA_DIST = bootstrap.sh debian @@ -37,9 +37,10 @@ RPMS = /usr/src/packages/RPMS/i586/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.i586. release: tag webserver rpm: dist - cp @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \ - /usr/src/packages/SOURCES/ - rpmbuild -ba --clean @PACKAGENAME@.spec + rpmbuild -ba \ + --define "_topdir $$(pwd)" \ + --define "_sourcedir $$(pwd)" \ + @PACKAGENAME@.spec deps = ${top_srcdir}/COPYING ${top_srcdir}/README ${top_srcdir}/INSTALL ${top_srcdir}/NEWS ${top_srcdir}/ChangeLog @@ -59,4 +60,4 @@ distclean-local: - rm -r autom4te.cache - rm aclocal.m4 config.guess config.sub configure \ depcomp install-sh ltmain.sh makefile makefile.in \ - missing mkinstalldirs + missing mkinstalldirs SPECS RPMS BUILD BUILDROOT SRPMS diff --git a/mrw-c++.spec.in b/mrw-c++.spec.in index 4f26594..b94641a 100644 --- a/mrw-c++.spec.in +++ b/mrw-c++.spec.in @@ -40,9 +40,9 @@ This package contains only the shared libraries required at runtime. %prep %setup -q CXXFLAGS="-O3" ./configure --prefix=/usr \ - --datadir=/usr/share/doc/packages \ - --enable-doxygen \ - --libdir=/usr/%_lib + --libdir=/usr/%_lib \ + --docdir=/usr/share/doc/packages/@PACKAGENAME@ \ + --enable-doxygen %build make @@ -56,6 +56,8 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) /usr/%_lib/*.so.* +/usr/share/pkgconfig +/usr/lib64/pkgconfig %doc /usr/share/doc/packages/@PACKAGENAME@/AUTHORS /usr/share/doc/packages/@PACKAGENAME@/COPYING @@ -78,10 +80,10 @@ This Package contains all files required for developement. %defattr(-,root,root,-) /usr/%_lib/*.so /usr/%_lib/*.a -/usr/lib/*.la +/usr/%_lib/*.la /usr/include /usr/share/doc/packages/@PACKAGENAME@/examples -/usr/share/doc/packages/@PACKAGENAME@/doc +/usr/share/doc/packages/@PACKAGENAME@/html /usr/share/doc/packages/@PACKAGENAME@/@PACKAGENAME@.spec /usr/share/doc/packages/@PACKAGENAME@/INSTALL