summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2007-08-16 09:39:50 +0000
committerFabian Groffen <grobian@gentoo.org>2007-08-16 09:39:50 +0000
commitbb36d4c158ae09a5d7058b56bde04eba0a5a5b4c (patch)
tree564dad4e32044b6b508933b2dd074e83c0dfedca
parentfix digest for Prefix (diff)
downloadprefix-bb36d4c158ae09a5d7058b56bde04eba0a5a5b4c.tar.gz
prefix-bb36d4c158ae09a5d7058b56bde04eba0a5a5b4c.tar.bz2
prefix-bb36d4c158ae09a5d7058b56bde04eba0a5a5b4c.zip
Experiment to unify and automate creating package config files.
Voyageur, Truedfx: please comment. svn path=/prefix-overlay/; revision=304
-rw-r--r--eclass/gnustep-base.eclass44
-rw-r--r--gnustep-libs/camaelon/Manifest3
-rw-r--r--gnustep-libs/camaelon/camaelon-0.2.ebuild5
-rw-r--r--gnustep-libs/camaelon/files/config-camaelon.sh6
4 files changed, 34 insertions, 24 deletions
diff --git a/eclass/gnustep-base.eclass b/eclass/gnustep-base.eclass
index 98dba1d..258b964 100644
--- a/eclass/gnustep-base.eclass
+++ b/eclass/gnustep-base.eclass
@@ -72,21 +72,14 @@ gnustep-base_src_install() {
egnustep_env
egnustep_doc
fi
- # Copies "convenience scripts"
- if [[ -f ${FILESDIR}/config-${PN}.sh ]] ; then
- dodir ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo
- exeinto ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo
- doexe "${FILESDIR}"/config-${PN}.sh
- fi
+ egnustep_install_config
}
gnustep-base_pkg_postinst() {
- # Informs user about existence of "convenience script"
- if [[ -f ${FILESDIR}/config-${PN}.sh ]] ; then
- elog "Make sure to set happy defaults for this package by executing:"
- elog " ${GNUSTEP_SYSTEM_TOOLS}/Gentoo/config-${PN}.sh"
- elog "as the user you will run the package as."
- fi
+ [[ $(type -t gnustep_config_script) != "function" ]] && return 0
+
+ elog "To use this package, as *user* you should run:"
+ elog " ${GNUSTEP_SYSTEM_TOOLS}/Gentoo/config-${PN}.sh"
}
# Clean/reset an ebuild to the installed GNUstep environment
@@ -107,7 +100,8 @@ egnustep_env() {
*-linux-gnu|*-solaris*)
append-ldflags \
-Wl,-rpath="${GNUSTEP_SYSTEM_LIBRARIES}" \
- -L"${GNUSTEP_SYSTEM_LIBRARIES}"
+ -L"${GNUSTEP_SYSTEM_LIBRARIES}" \
+ "-Xlinker --as-needed"
;;
*)
append-ldflags \
@@ -127,9 +121,9 @@ egnustep_env() {
-j1 )
# -j1 is needed as gnustep-make is not parallel-safe
- if ! use debug ; then
- GS_ENV=( "${GS_ENV[@]}" "debug=no" )
- fi
+ use debug \
+ && GS_ENV=( "${GS_ENV[@]}" "debug=yes" ) \
+ || GS_ENV=( "${GS_ENV[@]}" "debug=no" )
return 0
fi
@@ -169,4 +163,22 @@ egnustep_doc() {
fi
}
+egnustep_install_config() {
+ [[ $(type -t gnustep_config_script) != "function" ]] && return 0
+
+ local cfile=config-${PN}.sh
+
+ echo '#!/usr/bin/env bash' > "${T}"/${cfile}
+ echo "echo Applying ${P} default configuration ..." >> "${T}"/${cfile}
+ gnustep_config_script | \
+ while read line ; do
+ echo "echo ${line}" >> "${T}"/${cfile}
+ echo "${line}" >> "${T}"/${cfile}
+ done
+
+ dodir ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo
+ exeinto ${GNUSTEP_SYSTEM_TOOLS#${EPREFIX}}/Gentoo
+ doexe "${T}"/${cfile}
+}
+
EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_postinst
diff --git a/gnustep-libs/camaelon/Manifest b/gnustep-libs/camaelon/Manifest
index 404d1c6..4319a13 100644
--- a/gnustep-libs/camaelon/Manifest
+++ b/gnustep-libs/camaelon/Manifest
@@ -1,3 +1,2 @@
-AUX config-camaelon.sh 376 RMD160 7e1bbc32f780a5314b0ddfffb2b141e76d2e1304 SHA1 c109716071d117a5a02b2cc2488488bea5a09cfd SHA256 a9ef31cc0cd5182adb0e7d8f0fdf3b64ccffe8acd108d3e99c09b2e67abe82b4
DIST etoile-0.2.tar.gz 21233211 RMD160 340add5114d6bd2ba9d6da648ec041702a09d565 SHA1 9d384114f5ac317eebcc6b5cda3a0f5898a7c1c7 SHA256 e3a016ceaeb28c02b9a7ac71db51ced38c0dc0fc36c8b539d878b826f988ae0f
-EBUILD camaelon-0.2.ebuild 705 RMD160 a80beb7447ddf0760ca5349202c22d56b41c9e26 SHA1 48069721bf29a25792101df9bca93ab79e528c12 SHA256 15f9d0e9e7dfd2c487664cb97f8a2958bba8e7f394aa944e51bfb351b42fb396
+EBUILD camaelon-0.2.ebuild 915 RMD160 b6d71a5b2002c8cf92ad4fc849ebc71b8385d3d4 SHA1 dfcfa306518da162fd045786e3ee7ccc6362a347 SHA256 8356b326af87794c937328919173625b3df4748201c28b5eb608e0c90bbf1249
diff --git a/gnustep-libs/camaelon/camaelon-0.2.ebuild b/gnustep-libs/camaelon/camaelon-0.2.ebuild
index c075d7f..020fcda 100644
--- a/gnustep-libs/camaelon/camaelon-0.2.ebuild
+++ b/gnustep-libs/camaelon/camaelon-0.2.ebuild
@@ -23,3 +23,8 @@ src_install() {
mkdir -p ${D}${GNUSTEP_SYSTEM_LIBRARY}/Themes
ln -s ${GNUSTEP_SYSTEM_LIBRARY}/Bundles/Camaelon.themeEngine/Resources/Nesedah.theme ${D}${GNUSTEP_SYSTEM_LIBRARY}/Themes/
}
+
+gnustep_config_script() {
+ echo "defaults write NSGlobalDomain GSAppKitUserBundles '(\"${EPREFIX}\"/usr/GNUstep/System/Library/Bundles/Camaelon.themeEngine\")'"
+ echo "defaults write Camaelon Theme Nesedah"
+}
diff --git a/gnustep-libs/camaelon/files/config-camaelon.sh b/gnustep-libs/camaelon/files/config-camaelon.sh
deleted file mode 100644
index 3beee96..0000000
--- a/gnustep-libs/camaelon/files/config-camaelon.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-echo "Applying Camaelon default theme..."
-echo "defaults write NSGlobalDomain GSAppKitUserBundles \"(/usr/GNUstep/System/Library/Bundles/Camaelon.themeEngine)\""
-defaults write NSGlobalDomain GSAppKitUserBundles "(/usr/GNUstep/System/Library/Bundles/Camaelon.themeEngine)"
-echo "defaults write Camaelon Theme Nesedah"
-defaults write Camaelon Theme Nesedah