/[gentoo-x86]/eclass/obs-service.eclass
Gentoo

Diff of /eclass/obs-service.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/obs-service.eclass,v 1.1 2011/09/16 15:49:19 miska Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/obs-service.eclass,v 1.2 2012/02/25 22:56:56 miska Exp $
4 4
5# @ECLASS: obs-service.eclass 5# @ECLASS: obs-service.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# miska@gentoo.org 7# miska@gentoo.org
8# @BLURB: Reduces code duplication in the Open Build Service services. 8# @BLURB: Reduces code duplication in the Open Build Service services.
63 63
64for i in ${ADDITIONAL_FILES}; do 64for i in ${ADDITIONAL_FILES}; do
65 SRC_URI+=" ${OBS_URI}/${i}" 65 SRC_URI+=" ${OBS_URI}/${i}"
66done 66done
67 67
68S="${WORKDIR}"
69
70# @FUNCTION: obs-service_src_configure 68# @FUNCTION: obs-service_src_unpack
71# @DESCRIPTION: 69# @DESCRIPTION:
72# Does nothing. Files are not compressed. 70# Just copy files. Files are not compressed.
73obs-service_src_unpack() { 71obs-service_src_unpack() {
74 debug-print-function ${FUNCNAME} "$@" 72 debug-print-function ${FUNCNAME} "$@"
73 cd "${DISTDIR}"
74 mkdir -p "${S}"
75 cp ${A} "${S}"
76}
77
78# @FUNCTION: obs-service_src_prepare
79# @DESCRIPTION:
80# Replaces all /usr/lib/build directories with /usr/share/suse-build to reflect
81# where suse-build is installed in Gentoo.
82obs-service_src_prepare() {
83 debug-print-function ${FUNCNAME} "$@"
84 debug-print "Replacing all paths to find suse-build in Gentoo"
85 find "${S}" -type f -exec \
86 sed -i 's|/usr/lib/build|/usr/share/suse-build|g' {} +
75} 87}
76 88
77# @FUNCTION: obs-service_src_install 89# @FUNCTION: obs-service_src_install
78# @DESCRIPTION: 90# @DESCRIPTION:
79# Does the installation of the downloaded files. 91# Does the installation of the downloaded files.
80obs-service_src_install() { 92obs-service_src_install() {
81 debug-print-function ${FUNCNAME} "$@" 93 debug-print-function ${FUNCNAME} "$@"
82 debug-print "Installing service \"${OBS_SERVICE_NAME}\"" 94 debug-print "Installing service \"${OBS_SERVICE_NAME}\""
83 exeinto /usr/lib/obs/service 95 exeinto /usr/lib/obs/service
84 doexe "${DISTDIR}"/${OBS_SERVICE_NAME} 96 doexe "${S}"/${OBS_SERVICE_NAME}
85 insinto /usr/lib/obs/service 97 insinto /usr/lib/obs/service
86 doins "${DISTDIR}"/${OBS_SERVICE_NAME}.service 98 doins "${S}"/${OBS_SERVICE_NAME}.service
87 if [[ -n ${ADDITIONAL_FILES} ]]; then 99 if [[ -n ${ADDITIONAL_FILES} ]]; then
88 debug-print "Installing following additional files:" 100 debug-print "Installing following additional files:"
89 debug-print " ${ADDITIONAL_FILES}" 101 debug-print " ${ADDITIONAL_FILES}"
90 exeinto /usr/lib/obs/service/${OBS_SERVICE_NAME}.files 102 exeinto /usr/lib/obs/service/${OBS_SERVICE_NAME}.files
91 for i in ${ADDITIONAL_FILES}; do 103 for i in ${ADDITIONAL_FILES}; do
92 doexe "${DISTDIR}"/${i} 104 doexe "${S}"/${i}
93 done 105 done
94 fi 106 fi
95} 107}
96 108
97EXPORT_FUNCTIONS src_install src_unpack 109EXPORT_FUNCTIONS src_install src_prepare src_unpack

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20