2015-06-02 01:04:20 +00:00
|
|
|
DOVECOT_VERSION=2.2.9-1ubuntu2.1+miab1
|
|
|
|
|
2015-05-23 17:56:48 +00:00
|
|
|
all: clean build_postgrey build_dovecot_lucene
|
|
|
|
|
|
|
|
clean:
|
2015-05-19 01:54:12 +00:00
|
|
|
# Clean.
|
2015-05-23 16:55:55 +00:00
|
|
|
rm -rf /tmp/build
|
2015-05-19 01:54:12 +00:00
|
|
|
|
2015-06-02 01:04:20 +00:00
|
|
|
build_postgrey:
|
2015-05-19 01:54:12 +00:00
|
|
|
# Prepare to build source packages.
|
2015-05-23 16:55:55 +00:00
|
|
|
mkdir -p /tmp/build
|
2015-05-19 01:54:12 +00:00
|
|
|
|
|
|
|
# Download our fork of the Debian postgrey package.
|
2015-05-23 16:55:55 +00:00
|
|
|
git clone https://github.com/mail-in-a-box/postgrey /tmp/build/postgrey
|
2015-05-19 01:54:12 +00:00
|
|
|
|
|
|
|
# Download the corresponding upstream package.
|
2015-05-23 16:55:55 +00:00
|
|
|
wget -O /tmp/build/postgrey_1.35.orig.tar.gz http://postgrey.schweikert.ch/pub/postgrey-1.35.tar.gz
|
2015-05-19 01:54:12 +00:00
|
|
|
|
|
|
|
# Build the source package.
|
2015-05-23 16:55:55 +00:00
|
|
|
(cd /tmp/build/postgrey; dpkg-buildpackage -S -us -uc -nc)
|
2015-05-19 01:54:12 +00:00
|
|
|
|
|
|
|
# Sign the packages.
|
2015-05-23 16:55:55 +00:00
|
|
|
debsign /tmp/build/postgrey_1.35-1miab1_source.changes
|
2015-05-19 01:54:12 +00:00
|
|
|
|
|
|
|
# Upload to PPA.
|
2015-05-23 16:55:55 +00:00
|
|
|
dput ppa:mail-in-a-box/ppa /tmp/build/postgrey_1.35-1miab1_source.changes
|
2015-05-19 01:54:12 +00:00
|
|
|
|
|
|
|
# Clear the intermediate files.
|
2015-05-23 16:55:55 +00:00
|
|
|
rm -rf /tmp/build/postgrey
|
2015-05-19 01:54:12 +00:00
|
|
|
|
2015-05-23 17:56:48 +00:00
|
|
|
# TESTING BINARY PACKAGE
|
|
|
|
#sudo apt-get build-dep -y postgrey
|
|
|
|
#(cd /tmp/build/postgrey; dpkg-buildpackage -us -uc -nc)
|
|
|
|
|
|
|
|
build_dovecot_lucene:
|
2015-06-02 01:04:20 +00:00
|
|
|
# Prepare to build source packages.
|
|
|
|
mkdir -p /tmp/build
|
|
|
|
|
2015-05-23 17:56:48 +00:00
|
|
|
# Get the upstream source.
|
|
|
|
(cd /tmp/build; apt-get source dovecot)
|
|
|
|
|
|
|
|
# Patch it so that we build dovecot-lucene (and nothing else).
|
|
|
|
patch -p1 -d /tmp/build/dovecot-2.2.9 < dovecot_lucene.diff
|
|
|
|
|
|
|
|
# Build the source package.
|
|
|
|
(cd /tmp/build/dovecot-2.2.9; dpkg-buildpackage -S -us -uc -nc)
|
|
|
|
|
|
|
|
# Sign the packages.
|
2015-06-02 01:04:20 +00:00
|
|
|
debsign /tmp/build/dovecot_$(DOVECOT_VERSION)_source.changes
|
2015-05-23 17:56:48 +00:00
|
|
|
|
|
|
|
# Upload it.
|
2015-06-02 01:04:20 +00:00
|
|
|
dput ppa:mail-in-a-box/ppa /tmp/build/dovecot_$(DOVECOT_VERSION)_source.changes
|
2015-05-23 17:56:48 +00:00
|
|
|
|
|
|
|
# TESTING BINARY PACKAGE
|
|
|
|
# Install build dependencies and build dependencies we've added in our patch,
|
|
|
|
# and then build the binary package.
|
|
|
|
#sudo apt-get build-dep -y dovecot
|
|
|
|
#sudo apt-get install libclucene-dev liblzma-dev libexttextcat-dev libstemmer-dev
|
|
|
|
#(cd /tmp/build/dovecot-2.2.9; dpkg-buildpackage -us -uc -nc)
|