wok view psycopg/receipt @ rev 24535

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 23 11:49:52 2022 +0000 (2022-02-23)
parents 408c87fa22ca
children 76c41f0eab0e
line source
1 # SliTaz package receipt.
3 PACKAGE="psycopg"
4 VERSION="1.1.21"
5 CATEGORY="system-tools"
6 SHORT_DESC="PostgreSQL database adapter for the Python."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://initd.org/"
11 WGET_URL="http://initd.org/psycopg/tarballs/PSYCOPG-1-1/$TARBALL"
13 DEPENDS="python egenix-mx-base libpostgresqlclient"
14 BUILD_DEPENDS="python-dev egenix-mx-base postgresql-dev libpostgresqlclient"
16 # What is the latest version available today?
17 current_version()
18 {
19 wget -O - https://pypi.org/project/psycopg2/ 2>/dev/null | \
20 sed '/psycopg2 [0-9]/!d;s|.*g2.||'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 cd $src
27 python=python$(python --version 2>&1 | awk '{ print substr($2,0,3) }')
28 mkdir -p $DESTDIR/usr/lib/$python/site-packages
29 ./configure --prefix=/usr --infodir=/usr/share/info \
30 --with-mxdatetime-includes=/usr/lib/$python/site-packages/mx/DateTime/mxDateTime \
31 --with-postgres-libraries=/usr/lib/postgresql \
32 --mandir=/usr/share/man $CONFIGURE_ARGS &&
33 make &&
34 install -m 555 ./psycopgmodule.so $DESTDIR/usr/lib/$python/site-packages
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/lib/
41 cp -a $install/usr $fs
42 }