Skip to content

Commit

Permalink
release: build scripts update
Browse files Browse the repository at this point in the history
  • Loading branch information
hlamer committed Apr 27, 2015
1 parent 4749114 commit f613c51
Showing 1 changed file with 34 additions and 40 deletions.
74 changes: 34 additions & 40 deletions Makefile
Expand Up @@ -8,65 +8,59 @@ ENV=DEBFULLNAME="$(AUTHOR)" DEBEMAIL=$(AUTHOR_EMAIL) EDITOR=enki

DEBIGAN_ORIG_ARCHIVE=${PACKAGE_NAME}_${VERSION}.orig.tar.gz

ALL_SERIES = precise quantal raring saucy

CURRENT_SERIES = $(shell lsb_release -cs)

all install:
@echo This Makefile does not build and install the project.
@echo Use setup.py script
@exit -1


bump-version:
enki enki/core/defines.py +10
enki rpm/enki.spec +8
enki win/Enki.iss


changelog-update:
cd debian && \
$(ENV) dch -v $(VERSION)-1~ubuntuseries1 -b --distribution ubuntuseries
enki rpm/enki.spec +105


dist/${ARCHIVE}:
rm -rf dist
./setup.py sdist

dsc-%: dist/${ARCHIVE}
rm -rf build-$*
mkdir build-$*
cp dist/${ARCHIVE} build-$*/${DEBIGAN_ORIG_ARCHIVE}
cd build-$* && tar -xf ${DEBIGAN_ORIG_ARCHIVE}
cp -r debian build-$*/${PACKAGE_NAME}-${VERSION}
sed -i s/ubuntuseries/$*/g build-$*/${PACKAGE_NAME}-${VERSION}/debian/changelog
cd build-$*/${PACKAGE_NAME}-${VERSION} && $(ENV) debuild -us -uc -S
cd build-$*/${PACKAGE_NAME}-${VERSION} && $(ENV) debsign ../*.changes

dput-%: dsc-%
cd build-$* && dput enki-testing *.changes

dput-all: $(foreach series, $(ALL_SERIES), dput-$(series))
echo

deb-$(CURRENT_SERIES): dsc-$(CURRENT_SERIES)
cd build-$(CURRENT_SERIES)/$(PACKAGE_NAME)-$(VERSION) && debuild

deb-obs: dist/${ARCHIVE}
rm -rf build-obs
mkdir build-obs
cp dist/${ARCHIVE} build-obs/${DEBIGAN_ORIG_ARCHIVE}
cd build-obs && tar -xf ${DEBIGAN_ORIG_ARCHIVE}
cp -r debian build-obs/${PACKAGE_NAME}-${VERSION}
sed -i s/ubuntuseries/obs/g build-obs/${PACKAGE_NAME}-${VERSION}/debian/changelog
cd build-obs/${PACKAGE_NAME}-${VERSION} && $(ENV) debuild -us -uc -S

obs_home_hlamer_enki:
rm -rf build
mkdir build
cp dist/${ARCHIVE} build/${DEBIGAN_ORIG_ARCHIVE}
cd build && tar -xf ${DEBIGAN_ORIG_ARCHIVE}
cp -r debian build/${PACKAGE_NAME}-${VERSION}
sed -i s/ubuntuseries/obs/g build/${PACKAGE_NAME}-${VERSION}/debian/changelog
cd build/${PACKAGE_NAME}-${VERSION} && $(ENV) debuild -us -uc -S

build/obs_home_hlamer_enki:
osc co home:hlamer:enki enki
mv home\:hlamer\:enki obs_home_hlamer_enki

put-obs: obs_home_hlamer_enki deb-obs
rm -f obs_home_hlamer_enki/enki/*
cp rpm/enki.spec obs_home_hlamer_enki/enki
cp dist/${ARCHIVE} obs_home_hlamer_enki/enki
cp build-obs/*.debian.tar.gz obs_home_hlamer_enki/enki
cp build-obs/*.orig.tar.gz obs_home_hlamer_enki/enki
cp build-obs/*.dsc obs_home_hlamer_enki/enki
cd obs_home_hlamer_enki/enki && \
mv home\:hlamer\:enki build/obs_home_hlamer_enki

put-obs: build/obs_home_hlamer_enki deb-obs
rm -f build/obs_home_hlamer_enki/enki/*
cp rpm/enki.spec build/obs_home_hlamer_enki/enki
cp dist/${ARCHIVE} build/obs_home_hlamer_enki/enki
cp build/*.debian.tar.gz build/obs_home_hlamer_enki/enki
cp build/*.orig.tar.gz build/obs_home_hlamer_enki/enki
cp build/*.dsc build/obs_home_hlamer_enki/enki
cd build/obs_home_hlamer_enki/enki && \
osc addremove && \
osc ci -m 'update by the publish script'

sdist:
./setup.py sdist --formats=gztar,zip

help:
@echo 'bump-version Open version file to edit'
@echo 'changelog-update Update Debian and RedHat changelogs'
@echo 'put-obs Upload version to OBS'
@echo 'sdist Make source distribution'

0 comments on commit f613c51

Please sign in to comment.