diff --git a/.gitignore b/.gitignore index 67fe9f09d..3052ffc49 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,6 @@ oldcode/tests/connect_speed *.swp - # SQLITE files *.db *.db-shm @@ -44,6 +43,7 @@ oldcode/tests/connect_speed #binary proxysql +binaries/* #core core @@ -94,4 +94,4 @@ deps/re2/re2/ test/.vagrant .DS_Store -proxysql-tests.ini \ No newline at end of file +proxysql-tests.ini diff --git a/Makefile b/Makefile index 76c4328ab..deb08e800 100644 --- a/Makefile +++ b/Makefile @@ -41,10 +41,17 @@ clean: cd lib && make clean cd src && make clean -packages: - # Wipe out binaries directory entirely - rm -rf binaries && mkdir binaries +packages: centos7 ubuntu14 +.PHONY: packages +centos7: binaries/proxysql-0.3-1.x86_64.rpm +.PHONY: centos + +ubuntu14: binaries/proxysql_0.3_all.deb +.PHONY: ubuntu14 + +binaries/proxysql-0.3-1.x86_64.rpm: + mkdir binaries/centos7 || true # Create CentOS 7 rpm file by creating docker image, running a container and extracting the RPM from the temp container docker build -t centos7_proxysql --no-cache=true ./scenarios/centos7-build docker run -i --name=centos7_build centos7_proxysql bash & @@ -53,7 +60,7 @@ packages: docker kill centos7_build docker rm centos7_build - # Create DEB rpm +binaries/proxysql_0.3_all.deb: docker build -t ubuntu14_proxysql --no-cache=true ./scenarios/ubuntu-14.04-build docker run -i --name=ubuntu14_build ubuntu14_proxysql bash & sleep 5 @@ -61,11 +68,13 @@ packages: docker kill ubuntu14_build docker rm ubuntu14_build + .PHONY: cleanall cleanall: cd deps && make cleanall cd lib && make clean cd src && make clean + rm binaries/* -r install: src/proxysql install -m 0755 src/proxysql /usr/local/bin diff --git a/binaries/proxysql-0.3-1.x86_64.rpm b/binaries/proxysql-0.3-1.x86_64.rpm deleted file mode 100644 index 95beb8904..000000000 Binary files a/binaries/proxysql-0.3-1.x86_64.rpm and /dev/null differ diff --git a/binaries/proxysql_0.3_all.deb b/binaries/proxysql_0.3_all.deb deleted file mode 100644 index deba574bb..000000000 Binary files a/binaries/proxysql_0.3_all.deb and /dev/null differ diff --git a/scenarios/centos7-build/Dockerfile b/scenarios/centos7-build/Dockerfile index ccee9dde9..830b3386f 100644 --- a/scenarios/centos7-build/Dockerfile +++ b/scenarios/centos7-build/Dockerfile @@ -16,7 +16,7 @@ RUN yum install -y patch RUN cd /opt; git clone https://github.com/sysown/proxysql-0.2.git proxysql -RUN cd /opt/proxysql; make clean && make +RUN cd /opt/proxysql; make clean && make -j 5 RUN cd /opt/proxysql/src; mkdir -p proxysql-0.3/usr/bin; mkdir -p proxysql-0.3/etc; cp proxysql proxysql-0.3/usr/bin/; cp proxysql.cfg proxysql-0.3/etc; tar czvf proxysql-0.3.tar.gz proxysql-0.3 @@ -29,4 +29,4 @@ RUN cp /opt/proxysql/src/proxysql-0.3.tar.gz /root/rpmbuild/SOURCES RUN yum install -y rpm-build RUN cd /root/rpmbuild; rpmbuild -ba SPECS/proxysql.spec -RUN cp /root/rpmbuild/RPMS/x86_64/proxysql-0.3-1.x86_64.rpm /root/rpm \ No newline at end of file +RUN cp /root/rpmbuild/RPMS/x86_64/proxysql-0.3-1.x86_64.rpm /root/rpm diff --git a/scenarios/ubuntu-14.04-build/Dockerfile b/scenarios/ubuntu-14.04-build/Dockerfile index 804d8b74d..1f11646a1 100644 --- a/scenarios/ubuntu-14.04-build/Dockerfile +++ b/scenarios/ubuntu-14.04-build/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y\ libtool RUN cd /opt; git clone https://github.com/sysown/proxysql-0.2.git proxysql -RUN cd /opt/proxysql; make clean && make +RUN cd /opt/proxysql; make clean && make -j 5 ADD ./proxysql.ctl /opt/proxysql/src/proxysql.ctl -RUN cd /opt/proxysql/src; equivs-build proxysql.ctl \ No newline at end of file +RUN cd /opt/proxysql/src; equivs-build proxysql.ctl