Improving packaging #375

Improving compiling time

For ubuntu:
- fixed version number
- fixed architecture
- added init script
pull/383/head
René Cannaò 11 years ago
parent 5dfc4d3129
commit dcf02f2787

@ -26,11 +26,11 @@ debug:
.PHONY: deps
deps:
cd deps && make
cd deps && make -j
.PHONY: lib
lib:
cd lib && make -j 5
cd lib && make -j
.PHONY: src
src:
@ -47,11 +47,10 @@ packages: centos7 ubuntu14
centos7: binaries/proxysql-0.3-1.x86_64.rpm
.PHONY: centos
ubuntu14: binaries/proxysql_0.3_all.deb
ubuntu14: binaries/proxysql_0.2.0902_amd64.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 &
@ -60,11 +59,11 @@ binaries/proxysql-0.3-1.x86_64.rpm:
docker kill centos7_build
docker rm centos7_build
binaries/proxysql_0.3_all.deb:
binaries/proxysql_0.2.0902_amd64.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
docker cp ubuntu14_build:/opt/proxysql/src/proxysql_0.3_all.deb ./binaries
docker cp ubuntu14_build:/opt/proxysql/proxysql_0.2.0902_amd64.deb ./binaries
docker kill ubuntu14_build
docker rm ubuntu14_build
@ -74,7 +73,8 @@ cleanall:
cd deps && make cleanall
cd lib && make clean
cd src && make clean
rm binaries/* -r
rm binaries/*deb || true
rm binaries/*rpm || true
install: src/proxysql
install -m 0755 src/proxysql /usr/local/bin

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

@ -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 -j 5
RUN cd /opt/proxysql; make clean && make -j
ADD ./proxysql.ctl /opt/proxysql/src/proxysql.ctl
RUN cd /opt/proxysql/src; equivs-build proxysql.ctl
ADD ./proxysql.ctl /opt/proxysql/proxysql.ctl
RUN cd /opt/proxysql; equivs-build proxysql.ctl

@ -4,17 +4,19 @@ Homepage: http://www.proxysql.com
Standards-Version: 3.9.2
Package: proxysql
Version: 0.3
Version: 0.2.0902
Maintainer: Rene Cannao <rene.cannao@gmail.com>
Architecture: all
Architecture: amd64
# Changelog: CHANGELOG.md
# Readme: README.md
Files: proxysql /opt/proxysql
proxysql.cfg /etc
Files: src/proxysql /usr/bin/proxysql
etc/proxysql.cnf /
etc/init.d/proxysql /
Description: High performance MySQL proxy
ProxySQL is a fast, reliable MySQL proxy with advanced runtime configuration management (virtually no configuration change requires a restart).
.
It features query routing, query caching, query rewriting (for queries generated by ORMs, for example) and is most of the time a drop-in replacement for mysqld from the point of view of the application. It can be configured and remote controlled through an SQL-compatible admin interface.
File: postinst
#!/bin/sh -e
mkdir -p /var/run/proxysql
if [ ! -d /var/run/proxysql ]; then mkdir /var/run/proxysql ; fi
update-rc.d proxysql defaults

Loading…
Cancel
Save