aboutsummaryrefslogblamecommitdiffstats
path: root/community/repmgr/APKBUILD
blob: fcab854ec02c5ed442650fdc1f3dd99da565417a (plain) (tree)
1
2
3
4
5
6
7
8
9


                                               
            
        


                                            
                 
                                        
                                                         
                   
                    
                                          
                                                                                              
                         
                     
                      
         

         
                   



                       




                           







                                                            
                                                                        

                                                                         



                                                                                       
                                           






                                                                                 
                                                                                                                                                                 
                                                                                                                                                   
                                                                                                                                               
                                                                                                                                                 
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=repmgr
pkgver=5.2.1
pkgrel=1
pkgdesc="Replication Manager for PostgreSQL"
url="http://www.repmgr.org/"
arch="all"
license="GPL-3.0"
depends="cmd:ssh postgresql-client sudo"
makedepends="postgresql-dev flex libxml2-dev libedit-dev"
pkgusers="postgres"
pkggroups="postgres"
subpackages="$pkgname-doc $pkgname-daemon"
source="$pkgname-$pkgver.tar.gz::https://github.com/2ndQuadrant/repmgr/archive/v$pkgver.tar.gz
	repmgr.conf.patch
	repmgrd.initd
	repmgr.sudoers
	"

build() {
	./configure
	make USE_PGXS=1
}

check() {
	./repmgr --version
	./repmgrd --version
}

package() {
	make USE_PGXS=1 DESTDIR="$pkgdir" install

	install -D -m 640 -o postgres -g postgres \
		repmgr.conf.sample "$pkgdir"/etc/repmgr.conf

	cd "$pkgdir"

	mkdir -p usr/share/doc/$pkgname
	cp "$builddir"/*.md "$builddir"/doc/*.md usr/share/doc/$pkgname/

	install -D -m 600 "$srcdir"/repmgr.sudoers etc/sudoers.d/$pkgname
}

daemon() {
	pkgdesc="A management and monitoring daemon for PostgreSQL Replication Manager"
	depends="$pkgname=$pkgver-r$pkgrel"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/repmgrd "$subpkgdir"/usr/bin/

	install -D -m 755 "$srcdir"/repmgrd.initd "$subpkgdir"/etc/init.d/repmgrd
}

sha512sums="609ca27322087a042ede3a54565e425e9f39d74df510cbc103390cf60a31b35ce311cd942d5efd062bec2026864bd45466dbaf323963060d3ce89ce167c2a0b1  repmgr-5.2.1.tar.gz
ce16af48eff1ac7a54281f7a7b184b15aa4841b190a4b83024657ddb8d12c3fa91976d815f93d64f4ef255d9a710493d5a2f75c509f891d020f3a35e9fb05df3  repmgr.conf.patch
988d68205290aef2f1f63281d2dc7da7267ba2738d44a8908b0506e968d8acd895c03d9ee821d7ef5d240ec82b67e51fdfb2d9219e71237c1b0aa3f458ad134b  repmgrd.initd
1542e6742b01b9d780ab7d9bd81b1c7e134cdf2dcd234e10704273e34c3f7ee8f87cf4f07cdc22d8a10e0f1dcef605f50ccaada09c3f1ee10267477443ce3e78  repmgr.sudoers"