wok-next rev 20143

postgresql: receipt v2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 01 11:18:25 2017 +0100 (2017-11-01)
parents 337241e4865d
children a104655e7979
files libpostgresqlclient/receipt postgresql-client/receipt postgresql-dev/receipt postgresql-doc/receipt postgresql/receipt
line diff
     1.1 --- a/libpostgresqlclient/receipt	Wed Nov 01 11:06:02 2017 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,17 +0,0 @@
     1.4 -# SliTaz package receipt.
     1.5 -
     1.6 -PACKAGE="libpostgresqlclient"
     1.7 -VERSION="9.5.4"
     1.8 -CATEGORY="misc"
     1.9 -SHORT_DESC="Advanced object-relational database management system (client libraries)"
    1.10 -MAINTAINER="pascal.bellard@slitaz.org"
    1.11 -LICENSE="BSD"
    1.12 -WEB_SITE="https://www.postgresql.org/"
    1.13 -
    1.14 -WANTED="postgresql"
    1.15 -
    1.16 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.17 -genpkg_rules()
    1.18 -{
    1.19 -	copy libpq.so*
    1.20 -}
     2.1 --- a/postgresql-client/receipt	Wed Nov 01 11:06:02 2017 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,20 +0,0 @@
     2.4 -# SliTaz package receipt.
     2.5 -
     2.6 -PACKAGE="postgresql-client"
     2.7 -VERSION="9.5.4"
     2.8 -CATEGORY="misc"
     2.9 -SHORT_DESC="Advanced object-relational database management system (client files)"
    2.10 -MAINTAINER="pascal.bellard@slitaz.org"
    2.11 -LICENSE="BSD"
    2.12 -WEB_SITE="https://www.postgresql.org/"
    2.13 -PROVIDE="mysql_or_postgresql"
    2.14 -
    2.15 -WANTED="postgresql"
    2.16 -DEPENDS="libpostgresqlclient zlib ncurses readline"
    2.17 -
    2.18 -# Rules to gen a SliTaz package suitable for Tazpkg.
    2.19 -genpkg_rules()
    2.20 -{
    2.21 -	copy clusterdb createdb createlang createuser dropdb droplang \
    2.22 -		dropuser pg_dump pg_dumpall pg_restore psql reindexdb vacuumdb
    2.23 -}
     3.1 --- a/postgresql-dev/receipt	Wed Nov 01 11:06:02 2017 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,18 +0,0 @@
     3.4 -# SliTaz package receipt.
     3.5 -
     3.6 -PACKAGE="postgresql-dev"
     3.7 -VERSION="9.5.4"
     3.8 -CATEGORY="development"
     3.9 -SHORT_DESC="Advanced object-relational database management system (development files)"
    3.10 -MAINTAINER="pascal.bellard@slitaz.org"
    3.11 -LICENSE="BSD"
    3.12 -WEB_SITE="https://www.postgresql.org/"
    3.13 -
    3.14 -WANTED="postgresql"
    3.15 -DEPENDS="postgresql"
    3.16 -
    3.17 -# Rules to gen a SliTaz package suitable for Tazpkg.
    3.18 -genpkg_rules()
    3.19 -{
    3.20 -	copy *.h *.a *.pc pgxs/
    3.21 -}
     4.1 --- a/postgresql-doc/receipt	Wed Nov 01 11:06:02 2017 +0100
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,17 +0,0 @@
     4.4 -# SliTaz package receipt.
     4.5 -
     4.6 -PACKAGE="postgresql-doc"
     4.7 -VERSION="9.5.4"
     4.8 -CATEGORY="doc"
     4.9 -SHORT_DESC="Advanced object-relational database management system (documentation)"
    4.10 -MAINTAINER="pascal.bellard@slitaz.org"
    4.11 -LICENSE="BSD"
    4.12 -WEB_SITE="https://www.postgresql.org/"
    4.13 -
    4.14 -WANTED="postgresql"
    4.15 -
    4.16 -# Rules to gen a SliTaz package suitable for Tazpkg.
    4.17 -genpkg_rules()
    4.18 -{
    4.19 -	copy doc/
    4.20 -}
     5.1 --- a/postgresql/receipt	Wed Nov 01 11:06:02 2017 +0100
     5.2 +++ b/postgresql/receipt	Wed Nov 01 11:18:25 2017 +0100
     5.3 @@ -1,4 +1,4 @@
     5.4 -# SliTaz package receipt.
     5.5 +# SliTaz package receipt v2.
     5.6  
     5.7  PACKAGE="postgresql"
     5.8  VERSION="9.5.4"
     5.9 @@ -14,7 +14,7 @@
    5.10  
    5.11  DEPENDS="postgresql-client slitaz-base-files"
    5.12  BUILD_DEPENDS="readline-dev zlib-dev   perl python-dev"
    5.13 -SPLIT="libpostgresqlclient postgresql-client postgresql-doc"
    5.14 +SPLIT="libpostgresqlclient postgresql-client postgresql-dev postgresql-doc"
    5.15  
    5.16  # Rules to configure and make the package.
    5.17  compile_rules()
    5.18 @@ -35,23 +35,47 @@
    5.19  # Rules to gen a SliTaz package suitable for Tazpkg.
    5.20  genpkg_rules()
    5.21  {
    5.22 -	copy bin/ postgresql/ *.so*
    5.23 +	case $PACKAGE in
    5.24 +	postgresql)
    5.25 +		copy bin/ postgresql/ *.so*
    5.26  
    5.27 -	mkdir -p $fs/var/lib/pgsql $fs/var/log/postgresql $fs/etc/pgsql.d
    5.28 -	cp -a $stuff/etc $fs
    5.29 -	ln -s /var/lib/pgsql/postgresql.conf $fs/etc
    5.30 -	chmod 700 $fs/var/lib/pgsql
    5.31 +		mkdir -p $fs/var/lib/pgsql $fs/var/log/postgresql $fs/etc/pgsql.d
    5.32 +		cp -a $stuff/etc $fs
    5.33 +		ln -s /var/lib/pgsql/postgresql.conf $fs/etc
    5.34 +		chmod 700 $fs/var/lib/pgsql
    5.35  
    5.36 -	# split
    5.37 -	for i in clusterdb createdb createlang createuser dropdb droplang dropuser \
    5.38 -		pg_dump pg_dumpall pg_restore psql reindexdb vacuumdb libpq.so*; do
    5.39 -		find $fs -name $i -delete
    5.40 -	done
    5.41 -	rm -r $fs/usr/include $fs/usr/lib/postgresql/pgxs
    5.42 +		# split
    5.43 +		for i in clusterdb createdb createlang createuser dropdb droplang dropuser \
    5.44 +			pg_dump pg_dumpall pg_restore psql reindexdb vacuumdb libpq.so*; do
    5.45 +			find $fs -name $i -delete
    5.46 +		done
    5.47 +		rm -r $fs/usr/include $fs/usr/lib/postgresql/pgxs
    5.48 +		;;
    5.49 +	libpostgresqlclient)
    5.50 +		CAT="misc|Advanced object-relational database management system (client libraries)"
    5.51 +		copy libpq.so*
    5.52 +		;;
    5.53 +	postgresql-client)
    5.54 +		CAT="misc|Advanced object-relational database management system (client files)"
    5.55 +		PROVIDE="mysql_or_postgresql"
    5.56 +		DEPENDS="libpostgresqlclient zlib ncurses readline"
    5.57 +		copy clusterdb createdb createlang createuser dropdb droplang \
    5.58 +			dropuser pg_dump pg_dumpall pg_restore psql reindexdb vacuumdb
    5.59 +		;;
    5.60 +	postgresql-dev)
    5.61 +		CAT="development|Advanced object-relational database management system (development files)"
    5.62 +		DEPENDS="postgresql"
    5.63 +		copy *.h *.a *.pc pgxs/
    5.64 +		;;
    5.65 +	postgresql-doc)
    5.66 +		CAT="doc|Advanced object-relational database management system (documentation)"
    5.67 +		copy doc/
    5.68 +		;;
    5.69 +	esac
    5.70  }
    5.71  
    5.72  # Pre and post install commands for Tazpkg.
    5.73 -post_install()
    5.74 +post_install_postgresql()
    5.75  {
    5.76  	# adduser postgres if needed
    5.77  	if ! grep -q postgres: "$1/etc/passwd"; then
    5.78 @@ -81,7 +105,7 @@
    5.79  EOF
    5.80  }
    5.81  
    5.82 -post_remove()
    5.83 +post_remove_postgresql()
    5.84  {
    5.85  	# when both user and group have the same id# and name
    5.86  	# both group and user will get removed with either delusr/delgroup