Skip to content

Commit

Permalink
doozer/bintray: add automatic package publishing, rpm - fix paths for…
Browse files Browse the repository at this point in the history
… doozer
  • Loading branch information
perexg committed Apr 20, 2017
1 parent 937d6f8 commit 9ca5166
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 32 deletions.
36 changes: 24 additions & 12 deletions .doozer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --disable-libx265_static\\ --disable-libx265\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --disable-libx265_static\\ --disable-libx265\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"precise-i386": {
Expand All @@ -46,7 +47,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --disable-libx265_static\\ --disable-libx265\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --disable-libx265_static\\ --disable-libx265\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"trusty-amd64": {
Expand All @@ -70,7 +72,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"trusty-i386": {
Expand All @@ -94,7 +97,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"xenial-amd64": {
Expand All @@ -118,7 +122,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"xenial-i386": {
Expand All @@ -141,7 +146,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"jessie-i386": {
Expand All @@ -165,7 +171,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"jessie-amd64": {
Expand All @@ -189,7 +196,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-ffmpeg_static\\ --enable-hdhomerun_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"xenial-armhf": {
Expand All @@ -213,7 +221,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-hdhomerun_static\\ --disable-ffmpeg_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-hdhomerun_static\\ --disable-ffmpeg_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"xenial-arm64": {
Expand All @@ -237,7 +246,8 @@
"ccache"
],
"buildcmd": [
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-hdhomerun_static\\ --disable-ffmpeg_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}"
"AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\\ --enable-hdhomerun_static\\ --disable-ffmpeg_static ./Autobuild.sh -t ${TARGET} -j ${PARALLEL} -w ${WORKDIR}",
"support/bintray.py publish filelist.txt"
]
},
"fedora24-x86_64": {
Expand All @@ -262,7 +272,8 @@
"ccache"
],
"buildcmd": [
"./configure --disable-dvbscan && make -C rpm build-doozer"
"./configure --disable-dvbscan && make -C rpm build-doozer",
"support/bintray.py publish filelist.txt"
]
},
"centos7-x86_64": {
Expand All @@ -287,7 +298,8 @@
"ccache"
],
"buildcmd": [
"./configure --disable-dvbscan && make -C rpm build-doozer"
"./configure --disable-dvbscan && make -C rpm build-doozer",
"support/bintray.py publish filelist.txt"
]
}
}
Expand Down
3 changes: 3 additions & 0 deletions Autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ JOBSARGS=""
TARGET="debian"
RELEASE="--release"
WORKINGDIR="/var/tmp/showtime-autobuild"
FILELIST="$PWD/filelist.txt"
OP="build"
while getopts "vht:e:j:w:o:c:" OPTION
do
Expand Down Expand Up @@ -59,10 +60,12 @@ fi
#
artifact() {
echo "doozer-artifact:$PWD/$1:$2:$3:$4"
echo "$PWD/$1" >> "$FILELIST"
}

versioned_artifact() {
echo "doozer-versioned-artifact:$PWD/$1:$2:$3:$4"
echo "$PWD/$1" >> "$FILELIST"
}

if [ -f Autobuild/${TARGET}.sh ]; then
Expand Down
29 changes: 17 additions & 12 deletions rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

include $(dir $(lastword $(MAKEFILE_LIST)))../.config.mk
TOPDIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))

include $(TOPDIR)/../.config.mk

SPEC ?= tvheadend.spec.in

Expand All @@ -35,6 +37,7 @@ else
REF = $(COMMIT1)
COMMITR = $(COMMIT1)
endif
DEFINES = --define '_topdir $(TOPDIR)'

tvheadend.spec: $(SPEC)
@sed -e 's/@VERSION@/$(VERSION)/g' \
Expand All @@ -43,25 +46,27 @@ tvheadend.spec: $(SPEC)
-e 's/@COMMIT@/$(COMMITR)/g' \
$< > $@

~/rpmbuild/SOURCES:
mkdir -p $(foreach f,BUILD RPMS SOURCES SPECS SRPMS,~/rpmbuild/$(f))
SOURCES:
mkdir -p $(foreach f,BUILD RPMS SOURCES SPECS SRPMS,$(f))

.PHONY: srpm
srpm: ~/rpmbuild/SOURCES tvheadend.spec
spectool --get-files --sourcedir tvheadend.spec
rpmbuild -bs tvheadend.spec
srpm: SOURCES tvheadend.spec
spectool --get-files -C SOURCES tvheadend.spec
rpmbuild $(DEFINES) -bs tvheadend.spec

.PHONY: build
build: ~/rpmbuild/SOURCES tvheadend.spec
spectool --get-files --sourcedir tvheadend.spec
rpmbuild --build-root=/project/repo/rpmbuild -ba tvheadend.spec
build: SOURCES tvheadend.spec
spectool --get-files -C SOURCES tvheadend.spec
rpmbuild $(DEFINES) -ba tvheadend.spec

.PHONY: build-doozer
build-doozer: build
@for a in /project//repo/rpmbuild/RPMS/$$(uname -m)/tvheadend-$(VERSION)-$(RELEASE)*.rpm \
/project//repo/rpmbuild/RPMS/$$(uname -m)/tvheadend-debuginfo-$(VERSION)-$(RELEASE)*.rpm; do \
@rm -f ../filelist.txt
@for a in RPMS/$$(uname -m)/tvheadend-$(VERSION)-$(RELEASE)*.rpm \
RPMS/$$(uname -m)/tvheadend-debuginfo-$(VERSION)-$(RELEASE)*.rpm; do \
name=$$(basename $$a); \
echo "doozer-versioned-artifact:$$a:rpm:application/x-rpm:$$name"; \
echo "doozer-versioned-artifact:rpm/$$a:rpm:application/x-rpm:$$name"; \
echo "rpm/$$a" >> ../filelist.txt; \
done


Expand Down
Loading

0 comments on commit 9ca5166

Please sign in to comment.