OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 04-Jul-2008 16:18:13
Branch: HEAD Handle: 2008070415181200
Added files:
openpkg-src/libopkele libopkele.patch libopkele.spec
Log:
new package: libopkele 2.0 (OpenID Protocol Library)
Summary:
Revision Changes Path
1.1 +50 -0 openpkg-src/libopkele/libopkele.patch
1.1 +93 -0 openpkg-src/libopkele/libopkele.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/libopkele/libopkele.patch
============================================================================
$ cvs diff -u -r0 -r1.1 libopkele.patch
--- /dev/null 2008-07-04 16:18:00 +0200
+++ libopkele.patch 2008-07-04 16:18:12 +0200
@@ -0,0 +1,50 @@
+Index: configure.ac
+--- configure.ac
++++ configure.ac
+@@ -10,6 +10,7 @@ AC_PROG_LIBTOOL
+ PKG_PROG_PKG_CONFIG
+
+ AC_HEADER_STDC
++AC_CHECK_FUNCS([timegm])
+
+ AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
+
+Iindex: lib/util.cc
+--- lib/util.cc
++++ lib/util.cc
+@@ -122,6 +122,21 @@ namespace opkele {
+ return rv;
+ }
+
++#ifndef HAVE_TIMEGM
++ static time_t timegm(struct tm *t) {
++ char *tz = getenv("TZ");
++ setenv("TZ","",1); tzset();
++ time_t rv = mktime(t);
++ if(tz)
++ setenv("TZ",tz,1);
++ else
++ unsetenv("TZ");
++ tzset();
++ return rv;
++ }
++# define timegm opkele::util::timegm
++#endif /* HAVE_TIMEGM */
++
+ time_t w3c_to_time(const string& w) {
+ int fraction;
+ struct tm tm_t;
+@@ -145,10 +160,10 @@ namespace opkele {
+ throw failed_conversion(OPKELE_CP_ "failed to sscanf()");
+ tm_t.tm_mon--;
+ tm_t.tm_year-=1900;
+- time_t rv = mktime(&tm_t);
++ time_t rv = timegm(&tm_t);
+ if(rv==(time_t)-1)
+- throw failed_conversion(OPKELE_CP_ "failed to mktime()");
+- return rv-timezone;
++ throw failed_conversion(OPKELE_CP_ "failed to gmtime()");
++ return rv;
+ }
+
+ /*
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/libopkele/libopkele.spec
============================================================================
$ cvs diff -u -r0 -r1.1 libopkele.spec
--- /dev/null 2008-07-04 16:18:00 +0200
+++ libopkele.spec 2008-07-04 16:18:13 +0200
@@ -0,0 +1,93 @@
+##
+## libopkele.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package information
+Name: libopkele
+Summary: OpenID Protocol Library
+URL: http://kin.klever.net/libopkele/
+Vendor: Michael Krelin, Leonid Ivanov
+Packager: OpenPKG Foundation e.V.
+Distribution: OpenPKG Community
+Class: EVAL
+Group: Cryptography
+License: MIT-style
+Version: 2.0
+Release: 20080704
+
+# list of sources
+Source0: http://kin.klever.net/dist/libopkele-%{version}.tar.bz2
+Patch0: libopkele.patch
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, gcc::with_cxx = yes, make,
autoconf
+PreReq: OpenPKG, openpkg >= 20060823
+BuildPreReq: openssl, curl, sqlite, expat, tidy, pcre, zlib
+PreReq: openssl, curl, sqlite, expat, tidy, pcre, zlib
+AutoReq: no
+AutoReqProv: no
+
+%description
+ libopkele is a C++ implementation of an OpenID decentralized
+ identity system. It provides OpenID protocol handling, leaving
+ authentication and user interaction to the implementor.
+
+%track
+ prog libopkele = {
+ version = %{version}
+ url = http://kin.klever.net/libopkele/sources
+ regex = libopkele-(__VER__)\.tar\.bz2
+ }
+
+%prep
+ %setup -q
+ %patch -p0
+
+%build
+ aclocal >/dev/null 2>&1 || true
+ autoconf >/dev/null 2>&1 || true
+ CC="%{l_cc}" \
+ CXX="%{l_cxx}" \
+ CFLAGS="%{l_cflags -O}" \
+ CXXFLAGS="%{l_cxxflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --with-libcurl=%{l_prefix} \
+ --with-tr1-memory=std \
+ --disable-shared
+ %{l_make} %{l_mflags}
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+ %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]