# Ubuntu's VLC, rebuilt with --enable-run-as-root. Parted Magic runs as # root, and a stock VLC refuses root ("VLC is not supposed to be run as # root. Sorry."). x86 builds VLC the same way (x86 notes/packages.md). # The flag only compiles that refusal out of the vlc program. cd /work apt-get update -q apt-get source -q vlc cd "$(find . -maxdepth 1 -mindepth 1 -type d -name 'vlc-*' | head -1)" base=$(dpkg-parsechangelog -S Version) want=$(cat /src/BASE_VERSION) if [ "$base" != "$want" ]; then echo "Ubuntu's vlc is $base; the recipe was checked against $want." >&2 exit 1 fi apt-get build-dep -y -q ./ # debian/rules collects configure's flags in confflags (lines of # "confflags += ..."); one more line adds the flag. sed -i '/^# configure flags$/i confflags += --enable-run-as-root' debian/rules grep -q '^confflags += --enable-run-as-root$' debian/rules || { echo "debian/rules has no '# configure flags' line to add the flag before" >&2 exit 1 } dch -v "${base}+pmagic1" -D resolute "Build with --enable-run-as-root for Parted Magic." DEB_BUILD_OPTIONS="nocheck parallel=$JOBS" dpkg-buildpackage -b -uc -us cp ../*.deb /out/