[oe-commits] Roman I Khimov : squid: move potentially reusable in other versions parts to .inc files

git version control git at git.openembedded.org
Sat Mar 20 15:48:00 UTC 2010


Module: openembedded.git
Branch: rik/perl-5.10
Commit: be21d678d19609728d7087fddfc03ce17c8b38d5
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=be21d678d19609728d7087fddfc03ce17c8b38d5

Author: Roman I Khimov <khimov at altell.ru>
Date:   Thu Mar 18 19:09:02 2010 +0300

squid: move potentially reusable in other versions parts to .inc files

Signed-off-by: Roman I Khimov <khimov at altell.ru>

---

 recipes/squid/squid-native.inc             |    9 ++++++
 recipes/squid/squid-native_2.6.STABLE14.bb |   12 +------
 recipes/squid/squid.inc                    |   41 ++++++++++++++++++++++++++
 recipes/squid/squid_2.6.STABLE14.bb        |   43 ++--------------------------
 4 files changed, 55 insertions(+), 50 deletions(-)

diff --git a/recipes/squid/squid-native.inc b/recipes/squid/squid-native.inc
new file mode 100644
index 0000000..0f48805
--- /dev/null
+++ b/recipes/squid/squid-native.inc
@@ -0,0 +1,9 @@
+inherit native autotools
+
+SRC_URI = "http://www.squid-cache.org/Versions/v2/${SQUID_MAJOR}/squid-${PV}.tar.bz2"
+S = "${WORKDIR}/squid-${PV}"
+
+do_stage() {
+        install -d ${STAGING_BINDIR_NATIVE}   
+        install -m 0755 src/cf_gen ${STAGING_BINDIR_NATIVE}/cf_gen
+}
diff --git a/recipes/squid/squid-native_2.6.STABLE14.bb b/recipes/squid/squid-native_2.6.STABLE14.bb
index c8c4258..aede5dc 100644
--- a/recipes/squid/squid-native_2.6.STABLE14.bb
+++ b/recipes/squid/squid-native_2.6.STABLE14.bb
@@ -1,11 +1,3 @@
-inherit native autotools
+SQUID_MAJOR = "2.6"
 
-SRC_URI = "http://www.squid-cache.org/Versions/v2/2.6/squid-${PV}.tar.bz2"
-S = "${WORKDIR}/squid-${PV}"
-
-inherit native autotools
-
-do_stage() {
-        install -d ${STAGING_BINDIR_NATIVE}   
-        install -m 0755 src/cf_gen ${STAGING_BINDIR_NATIVE}/cf_gen
-}
+include squid-native.inc
diff --git a/recipes/squid/squid.inc b/recipes/squid/squid.inc
new file mode 100644
index 0000000..7fb3543
--- /dev/null
+++ b/recipes/squid/squid.inc
@@ -0,0 +1,41 @@
+DESCRIPTION = "Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more"
+LICENSE = "GPLv2"
+INC_PR = "r1"
+DEPENDS = "squid-native-${PV}"
+
+SRC_URI = "http://www.squid-cache.org/Versions/v2/${SQUID_MAJOR}/squid-${PV}.tar.bz2 \
+           file://fix_epoll_check.patch;patch=1 \
+           file://squid.init"
+
+inherit autotools update-rc.d
+
+EXTRA_OECONF = "--disable-epoll --disable-nls"
+
+logdir = ${localstatedir}/log/squid
+EXTRA_OEMAKE = "\
+  DEFAULT_CACHE_LOG=${logdir}/cache.log \
+  DEFAULT_ACCESS_LOG=${logdir}/access.log \
+  DEFAULT_STORE_LOG=${logdir}/store.log \
+  DEFAULT_PID_FILE=${localstatedir}/run/squid.pid \
+  DEFAULT_SWAP_DIR=${localstatedir}/spool/squid \
+  "
+
+INITSCRIPT_NAME = "squid"
+
+do_configure_append() {
+   sed -i -e 's|./cf_gen |${STAGING_BINDIR_NATIVE}/cf_gen |g' src/Makefile
+}
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d
+	install -m 755 ${WORKDIR}/squid.init ${D}${sysconfdir}/init.d/squid
+}
+
+# this packages the languages better and saves some space, installs
+# English as errors default and the others in locale package
+
+FILES_${PN} += " ${datadir}/errors/English/* \
+                 ${datadir}/icons/* \
+                 ${datadir}/mib.txt"
+
+FILES_${PN}-locale += " ${datadir}/errors/* " 
diff --git a/recipes/squid/squid_2.6.STABLE14.bb b/recipes/squid/squid_2.6.STABLE14.bb
index 10c20c5..125ac23 100644
--- a/recipes/squid/squid_2.6.STABLE14.bb
+++ b/recipes/squid/squid_2.6.STABLE14.bb
@@ -1,41 +1,4 @@
-DESCRIPTION = "Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more"
-LICENSE = "GPLv2"
-PR = "r1"
-DEPENDS = "squid-native-${PV}"
+PR = "${INC_PR}.0"
+SQUID_MAJOR = "2.6"
 
-SRC_URI = "http://www.squid-cache.org/Versions/v2/2.6/squid-${PV}.tar.bz2 \
-           file://fix_epoll_check.patch;patch=1 \
-           file://squid.init"
-
-inherit autotools update-rc.d
-
-EXTRA_OECONF = "--disable-epoll --disable-nls"
-
-logdir = ${localstatedir}/log/squid
-EXTRA_OEMAKE = "\
-  DEFAULT_CACHE_LOG=${logdir}/cache.log \
-  DEFAULT_ACCESS_LOG=${logdir}/access.log \
-  DEFAULT_STORE_LOG=${logdir}/store.log \
-  DEFAULT_PID_FILE=${localstatedir}/run/squid.pid \
-  DEFAULT_SWAP_DIR=${localstatedir}/spool/squid \
-  "
-
-INITSCRIPT_NAME = "squid"
-
-do_configure_append() {
-   sed -i -e 's|./cf_gen |${STAGING_BINDIR_NATIVE}/cf_gen |g' src/Makefile
-}
-
-do_install_append() {
-	install -d ${D}${sysconfdir}/init.d
-	install -m 755 ${WORKDIR}/squid.init ${D}${sysconfdir}/init.d/squid
-}
-
-# this packages the languages better and saves some space, installs
-# English as errors default and the others in locale package
-
-FILES_${PN} += " ${datadir}/errors/English/* \
-                 ${datadir}/icons/* \
-                 ${datadir}/mib.txt"
-
-FILES_${PN}-locale += " ${datadir}/errors/* " 
+include squid.inc
\ No newline at end of file





More information about the Openembedded-commits mailing list