The following changes were made:
* Split off separate dev package * Moved config to usr/share/eudev (managed by usher) * Added init file
This commit is contained in:
32
Makefile
32
Makefile
@@ -8,19 +8,24 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
DEPENDS = glibc,kmod,util-linux,xz,zlib
|
||||
ARCH = x86_64
|
||||
URL = http://www.gentoo.org/proj/en/eudev/
|
||||
export SRCPKG = eudev
|
||||
export DEPENDS = glibc,kmod,util-linux,xz,zlib
|
||||
export ARCH = x86_64
|
||||
export URL = http://www.gentoo.org/proj/en/eudev/
|
||||
BRIEF = Fork of udev
|
||||
DESC = eudev is a fork of system-udev with the goal of obtaining better \
|
||||
compatibility with existing software
|
||||
SNAPVER = 3
|
||||
SNAPVER = 4
|
||||
|
||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
||||
PATCHDIR := $(PWD)/SRC/patches
|
||||
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
||||
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
|
||||
sed 's/^-//')-$(SNAPVER)
|
||||
|
||||
DEV := $(PWD)/eudev-dev
|
||||
DEVROOT := $(DEV)/ROOT
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
@@ -73,7 +78,21 @@ $(ROOT): $(SRCDIR)/src/udev/udevd
|
||||
mkdir -v $(ROOT); \
|
||||
fi
|
||||
|
||||
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
|
||||
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
|
||||
install -v -d -m 755 $(ROOT)/etc/init.d && \
|
||||
install -v -d -m 755 $(ROOT)/usr/share/eudev && \
|
||||
mv -v $(ROOT)/etc/udev/udev.conf $(ROOT)/usr/share/eudev && \
|
||||
install -v -m 755 $(PWD)/SNAP/udevd.init $(ROOT)/etc/init.d/udevd
|
||||
|
||||
@install -v -d $(DEV)/SNAP && \
|
||||
install -v -d $(DEVROOT) && \
|
||||
for file in `find $(ROOT)|egrep 'pkgconfig\/|\.a$$|\.h$$'`; do \
|
||||
path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \
|
||||
mkdir -p $$path; \
|
||||
mv $$file $$path; \
|
||||
done && \
|
||||
find $(ROOT) -type d -empty -delete && \
|
||||
cd $(DEV) && make -f ../Makefile.eudev-dev && mv *.snap ../
|
||||
|
||||
test: $(ROOT)
|
||||
@cd $(SRCDIR); \
|
||||
@@ -81,6 +100,7 @@ test: $(ROOT)
|
||||
|
||||
clean:
|
||||
@rm -rvf $(ROOT) \
|
||||
$(DEV) \
|
||||
$(SNAPINFO) \
|
||||
$(MANIFEST) \
|
||||
$(FILES) \
|
||||
|
||||
15
Makefile.eudev-dev
Normal file
15
Makefile.eudev-dev
Normal file
@@ -0,0 +1,15 @@
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation here:
|
||||
# (http://www.gnu.org/licenses/gpl-2.0.html)
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
DEPENDS = eudev
|
||||
BRIEF = Development files for eudev
|
||||
DESC = Development files for eudev
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
37
SNAP/udevd.init
Executable file
37
SNAP/udevd.init
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: udev $time
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start: modules mountkernfs
|
||||
# Should-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Short-Description: Populate /dev and load kernel modules
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_info_msg "Starting udevd"
|
||||
/sbin/udevd --daemon || error=1
|
||||
|
||||
/sbin/udevadm trigger --action=add --type=subsystems || error=1
|
||||
/sbin/udevadm trigger --action=add --type=devices || error=1
|
||||
/sbin/udevadm trigger --action=change --type=devices || error=1
|
||||
/sbin/udevadm settle
|
||||
|
||||
[ -z $error ] && log_success_msg || log_failure_msg
|
||||
;;
|
||||
restart)
|
||||
log_info_msg "Reloading udev"
|
||||
udevadm control --reload-rules && udevadm trigger && \
|
||||
log_success_msg || log_failure_msg
|
||||
;;
|
||||
*)
|
||||
echo "Usage $0 [start|stop|restart]"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
20
SNAP/usher
20
SNAP/usher
@@ -7,22 +7,16 @@ case $1 in
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
KERNEL_VER=`ls -C1rt ${TARGET}/boot/vmlinuz*|sed 's/.*vmlinuz-//'`
|
||||
|
||||
if [[ ${TARGET} ]]; then
|
||||
echo "Running within ${TARGET} for kernel $KERNEL_VER"
|
||||
if ! mountpoint -q ${TARGET}/proc; then
|
||||
mount -t proc none ${TARGET}/proc
|
||||
if [ ! -f ${TARGET}/etc/udev/udev.conf ]; then
|
||||
install -m 644 ${TARGET}/usr/share/eudev/udev.conf \
|
||||
${TARGET}/etc/udev/udev.conf
|
||||
fi
|
||||
|
||||
chroot ${TARGET} /bin/bash -c "/sbin/mkinitramfs $KERNEL_VER"
|
||||
|
||||
if mountpoint -q ${TARGET}/proc; then
|
||||
umount ${TARGET}/proc
|
||||
fi
|
||||
if [[ ! ${TARGET} ]]; then
|
||||
/etc/init.d/udevd restart
|
||||
update-rc enable udevd
|
||||
else
|
||||
echo "Running for kernel $KERNEL_VER"
|
||||
mkinitramfs $KERNEL_VER
|
||||
chroot ${TARGET} 'update-rc enable udevd'
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
|
||||
Reference in New Issue
Block a user