Author: wyoung
Date: Fri Mar  3 05:34:57 2006
New Revision: 1196

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1196&view=rev
Log:
- Added rpm and srpm top-level build targets, and updated dist targets
  to support this.
- Updated RPM spec file so it packages new Bakefilized package structure
  correctly.

Modified:
    branches/v2.1-bakefile/mysql++.bkl
    branches/v2.1-bakefile/mysql++.spec.in

Modified: branches/v2.1-bakefile/mysql++.bkl
URL: 
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/mysql%2B%2B.bkl?rev=1196&r1=1195&r2=1196&view=diff
==============================================================================
--- branches/v2.1-bakefile/mysql++.bkl (original)
+++ branches/v2.1-bakefile/mysql++.bkl Fri Mar  3 05:34:57 2006
@@ -52,9 +52,9 @@
                                cp Bakefiles.bkgen bootstrap ChangeLog cleanmf \
                                        common.bkl config.guess config.h.in 
config.sub \
                                        configure* COPYING CREDITS do-upload 
fetch-backup \
-                                       HACKERS INSTALL install.bat 
libmysqlclient.def \
-                                       LICENSE Makefile* mysql++.* osver 
README* rebake \
-                                       reconf Wishlist $(PKGNAME)
+                                       HACKERS INSTALL install.bat install-sh \
+                                       libmysqlclient.def LICENSE Makefile* 
mysql++.* \
+                                       osver README* rebake reconf Wishlist 
$(PKGNAME)
                        </command>
                        <command>cp config/*.m4 $(PKGNAME)/config</command>
                        <command>cp doc/README* doc/ssqls-pretty 
$(PKGNAME)/doc</command>
@@ -78,9 +78,27 @@
 
                <action id="dist-build-examples">
                        <command>mkdir -p $(PKGNAME)/examples</command>
-                       <command>cp examples/*.{bkl,cpp,h} 
$(PKGNAME)/examples</command>
-                       <command>cp examples/Mak* $(PKGNAME)/examples</command>
-                       <command>cp examples/*.ds? $(PKGNAME)/examples</command>
+                       <command>
+                               ( cd examples &amp;&amp; \
+                                 cp *.{bkl,cpp,ds?,h} Mak* README 
../$(PKGNAME)/examples )
+                       </command>
+               </action>
+
+               <action id="rpm-setup">
+                       <command>cp $(PKGNAME).tar.gz 
/usr/src/redhat/SOURCES</command>
+                       <depends>dist</depends>
+               </action>
+
+               <action id="rpm">
+                       <command>cd /usr/src/redhat/SPECS</command>
+                       <command>rpmbuild -bb mysql++.spec</command>
+                       <depends>rpm-setup</depends>
+               </action>
+
+               <action id="srpm">
+                       <command>cd /usr/src/redhat/SPECS</command>
+                       <command>rpmbuild -bs mysql++.spec</command>
+                       <depends>rpm-setup</depends>
                </action>
        </if>
 </makefile>

Modified: branches/v2.1-bakefile/mysql++.spec.in
URL: 
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/mysql%2B%2B.spec.in?rev=1196&r1=1195&r2=1196&view=diff
==============================================================================
--- branches/v2.1-bakefile/mysql++.spec.in (original)
+++ branches/v2.1-bakefile/mysql++.spec.in Fri Mar  3 05:34:57 2006
@@ -31,24 +31,27 @@
 
 %prep
 %setup -q
-./configure --prefix=/usr --disable-dependency-tracking
+./bootstrap noexamples --prefix=/usr --disable-dependency-tracking
 
 %build
 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/usr/lib
-mkdir -p $RPM_BUILD_ROOT/usr/include
-mkdir -p $RPM_BUILD_ROOT/usr/src/mysql++/examples
+BDIR=$RPM_BUILD_ROOT/usr
+LIBDIR=$BDIR/lib
+INCDIR=$BDIR/include
+EXDIR=$BDIR/src/mysql++/examples
+mkdir -p $LIBDIR
+mkdir -p $INCDIR
+mkdir -p $EXDIR
 %{__make} install DESTDIR=$RPM_BUILD_ROOT
-install -m644 examples/*.cpp examples/*.h 
$RPM_BUILD_ROOT/usr/src/mysql++/examples
-install -m644 examples/Makefile.simple 
$RPM_BUILD_ROOT/usr/src/mysql++/examples/Makefile
+install -m644 examples/*.cpp examples/*.h $EXDIR
+install -m644 examples/Makefile.simple $EXDIR/Makefile
 cp examples/README doc/README.examples
 cp LICENSE doc
-rm $RPM_BUILD_ROOT/usr/lib/*.la
-rm $RPM_BUILD_ROOT/usr/lib/*.so
-rm $RPM_BUILD_ROOT/usr/lib/*.so.[0-9]
+mv doc/README.mysql++ doc/README
+mv $LIBDIR/*.so $LIBDIR/libmysqlpp.so.%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -58,11 +61,13 @@
        ln -sf /usr/lib/libmysqlpp.so.%{version} /usr/lib/libmysqlpp.so
        /sbin/ldconfig
 
-%postun -p /sbin/ldconfig
+%postun
+       rm /usr/lib/libmysqlpp.so
+       /sbin/ldconfig
 
 %files
 %defattr(-,root,root)
-%doc doc/LICENSE doc/README.mysql++
+%doc doc/LICENSE doc/README
 
 /usr/lib/libmysqlpp.*
 
@@ -75,7 +80,7 @@
 
 %files manuals
 %defattr(-,root,root)
-%doc doc/*.pdf doc/refman doc/userman
+#%doc doc/*.pdf doc/refman doc/userman
 
 %changelog
 * Sat Apr 30 2005 Warren Young <[EMAIL PROTECTED]> 1.7.34-1


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to