mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 02:46:10 +02:00
Add RPM packaging for CentOS, with Vagrant provision for this OS.
This commit is contained in:
parent
d5890f7779
commit
b9e584586e
20
Makefile
20
Makefile
@ -78,26 +78,26 @@ $(PGLOADER): manifest buildapp
|
||||
|
||||
pgloader: $(PGLOADER) ;
|
||||
|
||||
new-vm:
|
||||
vagrant destroy -f
|
||||
vagrant up
|
||||
|
||||
vm:
|
||||
vagrant up
|
||||
|
||||
vm-build: vm
|
||||
vagrant ssh -c "make -C /vagrant"
|
||||
|
||||
test:
|
||||
$(MAKE) PGLOADER=$(realpath $(PGLOADER)) -C test all
|
||||
|
||||
deb:
|
||||
# intended for use on a debian system
|
||||
mkdir -p $(DEBUILD_ROOT) && rm -rf $(DEBUILD_ROOT)/*
|
||||
rsync -Ca --exclude=build/* ./ $(DEBUILD_ROOT)/
|
||||
cd $(DEBUILD_ROOT) && make -f debian/rules orig
|
||||
cd $(DEBUILD_ROOT) && debuild -us -uc -sa
|
||||
cp -a /tmp/pgloader_* build/
|
||||
|
||||
rpm:
|
||||
# intended for use on a CentOS or other RPM based system
|
||||
mkdir -p $(DEBUILD_ROOT) && rm -rf $(DEBUILD_ROOT)/*
|
||||
rsync -Ca --exclude=build/* ./ $(DEBUILD_ROOT)/
|
||||
cd /tmp && tar czf $(HOME)/rpmbuild/SOURCES/pgloader-3.0.96.tar.gz pgloader
|
||||
cd $(DEBUILD_ROOT) && rpmbuild -ba pgloader.spec
|
||||
cp -a $(HOME)/rpmbuild/SRPMS/*rpm build
|
||||
cp -a $(HOME)/rpmbuild/RPMS/x86_64/*rpm build
|
||||
|
||||
check: test ;
|
||||
|
||||
.PHONY: test
|
||||
|
||||
20
Vagrantfile
vendored
20
Vagrantfile
vendored
@ -5,10 +5,22 @@
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "wheezy64"
|
||||
|
||||
config.vm.provision "shell" do |s|
|
||||
s.path = "bootstrap.sh"
|
||||
s.privileged = false
|
||||
config.vm.define "wheezy" do |wheezy|
|
||||
wheezy.vm.box = "wheezy64"
|
||||
|
||||
config.vm.provision "shell" do |s|
|
||||
s.path = "bootstrap-debian.sh"
|
||||
s.privileged = false
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define "centos" do |centos|
|
||||
centos.vm.box = "CentOS64"
|
||||
|
||||
config.vm.provision "shell" do |s|
|
||||
s.path = "bootstrap-centos.sh"
|
||||
s.privileged = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
23
bootstrap-centos.sh
Normal file
23
bootstrap-centos.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo yum -y install yum-utils @development-tools sbcl sqlite-devel
|
||||
|
||||
# SBCL 1.1.14
|
||||
# http://www.mikeivanov.com/post/66510551125/installing-sbcl-1-1-on-rhel-centos-systems
|
||||
sudo yum -y groupinstall "Development Tools"
|
||||
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
|
||||
sudo rpm -Uvh epel-release-6*.rpm
|
||||
sudo yum install -y sbcl.x86_64
|
||||
|
||||
wget http://downloads.sourceforge.net/project/sbcl/sbcl/1.1.14/sbcl-1.1.14-source.tar.bz2
|
||||
tar xfj sbcl-1.1.14-source.tar.bz2
|
||||
cd sbcl-1.1.14
|
||||
./make.sh --with-sb-thread --with-sb-core-compression > /dev/null 2>&1
|
||||
sudo sh install.sh
|
||||
cd
|
||||
|
||||
# remove the old version that we used to compile the newer one.
|
||||
sudo yum remove -y sbcl
|
||||
|
||||
# pgloader
|
||||
#make -C /vagrant rpm
|
||||
43
pgloader.spec
Normal file
43
pgloader.spec
Normal file
@ -0,0 +1,43 @@
|
||||
Summary: extract, transform and load data into PostgreSQL
|
||||
Name: pgloader
|
||||
Version: 3.0.96
|
||||
Release: 21%{?dist}
|
||||
License: The PostgreSQL Licence
|
||||
Group: System Environment/Base
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
URL: https://github.com/dimitri/pgloader
|
||||
|
||||
%description
|
||||
pgloader imports data from different kind of sources and COPY it into
|
||||
PostgreSQL.
|
||||
|
||||
The command language is described in the manual page and allows to describe
|
||||
where to find the data source, its format, and to describe data processing
|
||||
and transformation.
|
||||
|
||||
Supported source formats include CSV, fixed width flat files, dBase3 files
|
||||
(DBF), and SQLite and MySQL databases. In most of those formats, pgloader is
|
||||
able to auto-discover the schema and create the tables and the indexes in
|
||||
PostgreSQL. In the MySQL case it's possible to edit CASTing rules from the
|
||||
pgloader command directly.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
|
||||
%build
|
||||
%define debug_package %{nil}
|
||||
make pgloader
|
||||
|
||||
%install
|
||||
install -m 755 -d %{buildroot}/%{_bindir}
|
||||
cp build/pgloader.exe %{buildroot}/%{_bindir}/pgloader
|
||||
|
||||
%files
|
||||
%doc README.md pgloader.1.md
|
||||
%{_bindir}/*
|
||||
|
||||
%changelog
|
||||
* Tue Dec 31 2013 Dimitri Fontaine <dimitri@2ndQuadrant.fr> 3.0.96
|
||||
- Package as an RPM
|
||||
|
||||
%global __os_install_post %{nil}
|
||||
Loading…
x
Reference in New Issue
Block a user