File: pre_install_extras

package info (click to toggle)
piuparts 0.62
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,692 kB
  • sloc: python: 6,823; sh: 2,194; makefile: 126
file content (35 lines) | stat: -rwxr-xr-x 616 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
set -e

log_debug() {
	echo "Debug: piuparts extra for package $PIUPARTS_OBJECTS"
}

if [ "$PIUPARTS_PHASE" = "install" ]; then

    case ${PIUPARTS_OBJECTS%%=*} in
	*dkms)
		log_debug
		# Install kernel headers, so that dkms tries to build a module
		HEADERS=linux-headers
		FLAVOR=unknown
		FLAVOR_i386=686-pae
		case $PIUPARTS_DISTRIBUTION in
			lenny*|squeeze*)
				HEADERS=linux-headers-2.6
				FLAVOR_i386=686
				;;
		esac
		case $(dpkg --print-architecture) in
			amd64)
				FLAVOR=amd64
				;;
			i386)
				FLAVOR=$FLAVOR_i386
				;;
		esac
		apt-get -y install $HEADERS-$FLAVOR
		;;
    esac

fi