Skip to content

Commit

Permalink
Amending omnidb-plugin build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wind39 committed Dec 4, 2019
1 parent 0ce4958 commit 88ede2b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 35 deletions.
11 changes: 3 additions & 8 deletions OmniDB/deploy/plugin_centos6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ SHELL ["/bin/bash", "-c"]
RUN yum -y update \
&& yum -y install epel-release \
&& yum install -y gcc gcc-c++ make git patch rpm-build \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-centos10-10-2.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/pgdg-redhat11-11-2.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
&& yum -y check-update \
&& yum -y install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel \
&& yum -y install postgresql94 postgresql94-server postgresql94-libs postgresql94-contrib postgresql94-devel \
&& yum -y install postgresql95 postgresql95-server postgresql95-libs postgresql95-contrib postgresql95-devel \
&& yum -y install postgresql96 postgresql96-server postgresql96-libs postgresql96-contrib postgresql96-devel \
&& yum -y install postgresql10 postgresql10-server postgresql10-libs postgresql10-contrib postgresql10-devel \
&& yum -y install postgresql11 postgresql11-server postgresql11-libs postgresql11-contrib postgresql11-devel
&& yum -y install postgresql11 postgresql11-server postgresql11-libs postgresql11-contrib postgresql11-devel \
&& yum -y install postgresql12 postgresql12-server postgresql12-libs postgresql12-contrib postgresql12-devel

COPY clone.sh $HOME/
12 changes: 6 additions & 6 deletions OmniDB/deploy/plugin_centos6/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ echo -n "Cleaning... "
rm -f *.o
echo "Done."

echo "Compiling for 9.3... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-9.3/lib -lpq -I /usr/pgsql-9.3/include -I /usr/pgsql-9.3/include/server
gcc -fPIC -o omnidb_plugin_93.so omnidb_plugin.o -L /usr/pgsql-9.3/lib -lpq -shared
echo "Done."

echo "Compiling for 9.4... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-9.4/lib -lpq -I /usr/pgsql-9.4/include -I /usr/pgsql-9.4/include/server
Expand Down Expand Up @@ -45,6 +39,12 @@ gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-11/lib -lpq -I /us
gcc -fPIC -o omnidb_plugin_11.so omnidb_plugin.o -L /usr/pgsql-11/lib -lpq -shared
echo "Done."

echo "Compiling for 12... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-12/lib -lpq -I /usr/pgsql-12/include -I /usr/pgsql-12/include/server
gcc -fPIC -o omnidb_plugin_12.so omnidb_plugin.o -L /usr/pgsql-12/lib -lpq -shared
echo "Done."

echo -n "Cleaning... "
rm -f *.o
echo "Done."
Expand Down
11 changes: 3 additions & 8 deletions OmniDB/deploy/plugin_centos7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ SHELL ["/bin/bash", "-c"]
RUN yum -y update \
&& yum -y install epel-release \
&& yum install -y gcc gcc-c++ make git patch rpm-build \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat11-11-2.noarch.rpm \
&& rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm \
&& yum -y check-update \
&& yum -y install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel \
&& yum -y install postgresql94 postgresql94-server postgresql94-libs postgresql94-contrib postgresql94-devel \
&& yum -y install postgresql95 postgresql95-server postgresql95-libs postgresql95-contrib postgresql95-devel \
&& yum -y install postgresql96 postgresql96-server postgresql96-libs postgresql96-contrib postgresql96-devel \
&& yum -y install postgresql10 postgresql10-server postgresql10-libs postgresql10-contrib postgresql10-devel \
&& yum -y install postgresql11 postgresql11-server postgresql11-libs postgresql11-contrib postgresql11-devel
&& yum -y install postgresql11 postgresql11-server postgresql11-libs postgresql11-contrib postgresql11-devel \
&& yum -y install postgresql12 postgresql12-server postgresql12-libs postgresql12-contrib postgresql12-devel

COPY clone.sh $HOME/
12 changes: 6 additions & 6 deletions OmniDB/deploy/plugin_centos7/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ echo -n "Cleaning... "
rm -f *.o
echo "Done."

echo "Compiling for 9.3... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-9.3/lib -lpq -I /usr/pgsql-9.3/include -I /usr/pgsql-9.3/include/server
gcc -fPIC -o omnidb_plugin_93.so omnidb_plugin.o -L /usr/pgsql-9.3/lib -lpq -shared
echo "Done."

echo "Compiling for 9.4... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-9.4/lib -lpq -I /usr/pgsql-9.4/include -I /usr/pgsql-9.4/include/server
Expand Down Expand Up @@ -45,6 +39,12 @@ gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-11/lib -lpq -I /us
gcc -fPIC -o omnidb_plugin_11.so omnidb_plugin.o -L /usr/pgsql-11/lib -lpq -shared
echo "Done."

echo "Compiling for 12... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -L /usr/pgsql-12/lib -lpq -I /usr/pgsql-12/include -I /usr/pgsql-12/include/server
gcc -fPIC -o omnidb_plugin_12.so omnidb_plugin.o -L /usr/pgsql-12/lib -lpq -shared
echo "Done."

echo -n "Cleaning... "
rm -f *.o
echo "Done."
Expand Down
2 changes: 1 addition & 1 deletion OmniDB/deploy/plugin_debian8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ RUN apt-get update -y \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - \
&& apt-get update -y \
&& apt-get -y install build-essential git postgresql-server-dev-9.3 postgresql-server-dev-9.4 postgresql-server-dev-9.5 postgresql-server-dev-9.6 postgresql-server-dev-10 postgresql-server-dev-11 libpq-dev
&& apt-get -y install build-essential git postgresql-server-dev-9.4 postgresql-server-dev-9.5 postgresql-server-dev-9.6 postgresql-server-dev-10 postgresql-server-dev-11 postgresql-server-dev-12 libpq-dev

COPY clone.sh $HOME/
12 changes: 6 additions & 6 deletions OmniDB/deploy/plugin_debian8/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ echo -n "Cleaning... "
rm -f *.o
echo "Done."

echo "Compiling for 9.3... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -lpq -I /usr/include/postgresql -I /usr/include/postgresql/9.3/server
gcc -fPIC -o omnidb_plugin_93.so omnidb_plugin.o -lpq -shared
echo "Done."

echo "Compiling for 9.4... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -lpq -I /usr/include/postgresql -I /usr/include/postgresql/9.4/server
Expand Down Expand Up @@ -45,6 +39,12 @@ gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -lpq -I /usr/include/postgresql
gcc -fPIC -o omnidb_plugin_11.so omnidb_plugin.o -lpq -shared
echo "Done."

echo "Compiling for 12... "
rm -f *.o
gcc -fPIC -c -o omnidb_plugin.o omnidb_plugin.c -lpq -I /usr/include/postgresql -I /usr/include/postgresql/12/server
gcc -fPIC -o omnidb_plugin_12.so omnidb_plugin.o -lpq -shared
echo "Done."

echo -n "Cleaning... "
rm -f *.o
echo "Done."
Expand Down

0 comments on commit 88ede2b

Please sign in to comment.