From c63aa9839cc3f0cf5cad5042865c4ed97facda4b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 10 Jun 2015 15:40:51 +0300 Subject: iso-codes: add a recipe from meta-oe iso-codes is a dependency of epiphany Signed-off-by: Alexander Kanavin Signed-off-by: Ross Burton --- meta/recipes-support/iso-codes/iso-codes_3.58.bb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta/recipes-support/iso-codes/iso-codes_3.58.bb (limited to 'meta') diff --git a/meta/recipes-support/iso-codes/iso-codes_3.58.bb b/meta/recipes-support/iso-codes/iso-codes_3.58.bb new file mode 100644 index 0000000000..7112e461be --- /dev/null +++ b/meta/recipes-support/iso-codes/iso-codes_3.58.bb @@ -0,0 +1,15 @@ +SUMMARY = "ISO language, territory, currency, script codes and their translations" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fbc093901857fcd118f065f900982c24" + +SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz" +SRC_URI[md5sum] = "34097a0085f0979e28f9db66ec274c5e" +SRC_URI[sha256sum] = "86af5735dce6e4eff2b983e5d8aa9a3dea1b8db702333ff20be89e45f7f35a72" + +# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which +# are inhibited by allarch +DEPENDS = "gettext-native" + +inherit allarch autotools + +FILES_${PN} += "${datadir}/xml/" -- cgit 1.2.3-korg henQi/CVE-2016-7795 OpenEmbedded Core user contribution treesGrokmirror user
summaryrefslogtreecommitdiffstats
blob: ab929957a5a2bf76452c6856fa648befd8f7d6d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/sh

# Default to avoiding the first two disks on typical Linux and Mac OS installs
# Better safe than sorry :-)
BLACKLIST_DEVICES="/dev/sda /dev/sdb /dev/disk1 /dev/disk2"

# 1MB blocksize
BLOCKSIZE=1048576

usage() {
	echo "Usage: $(basename $0) IMAGE DEVICE"
}

image_details() {
	IMG=$1
	echo "Image details"
	echo "============="
	echo "    image: $(basename $IMG)"
	# stat format is different on Mac OS and Linux
	if [ "$(uname)" = "Darwin" ]; then
		echo "     size: $(stat -L -f '%z bytes' $IMG)"
		echo " modified: $(stat -L -f '%Sm' $IMG)"
	else
		echo "     size: $(stat -L -c '%s bytes' $IMG)"
		echo " modified: $(stat -L -c '%y' $IMG)"
	fi
	echo "     type: $(file -L -b $IMG)"
	echo ""
}

device_details() {
	DEV=$1
	BLOCK_SIZE=512

	echo "Device details"
	echo "=============="

	# Collect disk info using diskutil on Mac OS
	if [ "$(uname)" = "Darwin" ]; then
		diskutil info $DEVICE | egrep "(Device Node|Media Name|Total Size)"
		return
	fi

	# Default / Linux information collection
	echo "  device: $DEVICE"
	if [ -f "/sys/class/block/$DEV/device/vendor" ]; then
		echo "  vendor: $(cat /sys/class/block/$DEV/device/vendor)"
	else
		echo "  vendor: UNKOWN"
	fi
	if [ -f "/sys/class/block/$DEV/device/model" ]; then
		echo "   model: $(cat /sys/class/block/$DEV/device/model)"
	else
		echo "   model: UNKNOWN"
	fi
	if [ -f "/sys/class/block/$DEV/size" ]; then
		echo "    size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes"
	else
		echo "    size: UNKNOWN"
	fi
	echo ""
}

if [ $# -ne 2 ]; then
	usage
	exit 1
fi

IMAGE=$1
DEVICE=$2

if [ ! -e "$IMAGE" ]; then
	echo "ERROR: Image $IMAGE does not exist"
	usage
	exit 1
fi


for i in ${BLACKLIST_DEVICES}; do
	if [ "$i" = "$DEVICE" ]; then
		echo "ERROR: Device $DEVICE is blacklisted"
		exit 1
	fi
done

if [ ! -w "$DEVICE" ]; then
	echo "ERROR: Device $DEVICE does not exist or is not writable"
	usage
	exit 1
fi

image_details $IMAGE
device_details $(basename $DEVICE)

printf "Write $IMAGE to $DEVICE [y/N]? "
read RESPONSE
if [ "$RESPONSE" != "y" ]; then
	echo "Write aborted"
	exit 0
fi

echo "Writing image..."
if which pv >/dev/null 2>&1; then
	pv "$IMAGE" | dd of="$DEVICE" bs="$BLOCKSIZE"
else
	dd if="$IMAGE" of="$DEVICE" bs="$BLOCKSIZE"
fi
sync