Compare commits
3 Commits
v0.0alpha1
...
v0.0alpha1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab041cd8ef | ||
|
|
4cec71bfbb | ||
|
|
aeb36acc25 |
2
Makefile
2
Makefile
@@ -16,7 +16,7 @@ DESC = Base system directories and files
|
|||||||
ARCHIVE :=
|
ARCHIVE :=
|
||||||
SRCDIR := $(PWD)/SRC/snap-base
|
SRCDIR := $(PWD)/SRC/snap-base
|
||||||
PATCHDIR := $(PWD)/SRC/patches
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
VERSION := 0.0alpha1-0
|
VERSION := 0.0alpha1-3
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
|
|||||||
53
SNAP/usher
53
SNAP/usher
@@ -7,31 +7,34 @@ case $1 in
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
postinst)
|
postinst)
|
||||||
if [[ ${TARGET} ]]; then
|
if [ ! -f ${TARGET}/etc/bashrc ]; then
|
||||||
if [ ! -f ${TARGET}/etc/bashrc ]; then
|
install -m 0644 ${TARGET}/usr/share/snap-base/bashrc \
|
||||||
install -m 0644 ${TARGET}/usr/share/snap-base/bashrc \
|
${TARGET}/etc/bashrc
|
||||||
${TARGET}/etc/bashrc
|
fi
|
||||||
fi
|
if [ ! -f ${TARGET}/etc/group ]; then
|
||||||
if [ ! -f ${TARGET}/etc/group ]; then
|
install -m 0644 ${TARGET}/usr/share/snap-base/group \
|
||||||
install -m 0644 ${TARGET}/usr/share/snap-base/group \
|
${TARGET}/etc/group
|
||||||
${TARGET}/etc/group
|
fi
|
||||||
fi
|
if [ ! -f ${TARGET}/etc/passwd ]; then
|
||||||
if [ ! -f ${TARGET}/etc/passwd ]; then
|
install -m 0644 ${TARGET}/usr/share/snap-base/passwd \
|
||||||
install -m 0644 ${TARGET}/usr/share/snap-base/passwd \
|
${TARGET}/etc/passwd
|
||||||
${TARGET}/etc/passwd
|
fi
|
||||||
fi
|
if [ ! -f ${TARGET}/etc/profile ]; then
|
||||||
if [ ! -f ${TARGET}/etc/profile ]; then
|
install -m 0644 ${TARGET}/usr/share/snap-base/profile \
|
||||||
install -m 0644 ${TARGET}/usr/share/snap-base/profile \
|
${TARGET}/etc/profile
|
||||||
${TARGET}/etc/profile
|
fi
|
||||||
fi
|
if [ ! -f ${TARGET}/etc/snap.conf ]; then
|
||||||
if [ ! -f ${TARGET}/etc/snap.conf ]; then
|
install -m 0644 ${TARGET}/usr/share/snap-base/snap.conf \
|
||||||
install -m 0644 ${TARGET}/usr/share/snap-base/snap.conf \
|
${TARGET}/etc/snap.conf
|
||||||
${TARGET}/etc/snap.conf
|
fi
|
||||||
fi
|
if [ ! -f ${TARGET}/var/log/btmp ]; then
|
||||||
if [ ! -f ${TARGET}/etc/snap_version ]; then
|
install -v -m 600 /dev/null ${TARGET}/var/log/btmp
|
||||||
install -m 0644 ${TARGET}/usr/share/snap-base/snap_version \
|
fi
|
||||||
${TARGET}/etc/snap_version
|
if [ ! -f ${TARGET}/var/log/lastlog ]; then
|
||||||
fi
|
install -v -m 664 /dev/null ${TARGET}/var/log/lastlog
|
||||||
|
fi
|
||||||
|
if [ ! -f ${TARGET}/var/log/wtmp ]; then
|
||||||
|
install -v -m 664 /dev/null ${TARGET}/var/log/wtmp
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
prerm)
|
prerm)
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
install: base usr var lib snap
|
install: base usr etc var lib snap
|
||||||
|
|
||||||
base:
|
base:
|
||||||
@install -v -d -m 0755 -o root -g root \
|
@install -v -d -m 0755 -o root -g root \
|
||||||
$(DESTDIR)/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc} && \
|
$(DESTDIR)/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc} && \
|
||||||
install -v -d -m 0755 -o root -g root \
|
install -v -d -m 0755 -o root -g root \
|
||||||
$(DESTDIR)/{run,sbin,srv,usr,var} && \
|
$(DESTDIR)/{run,sbin,srv,sys,usr,var} && \
|
||||||
install -v -d -m 0750 -o root -g root \
|
install -v -d -m 0750 -o root -g root \
|
||||||
$(DESTDIR)/root && \
|
$(DESTDIR)/root && \
|
||||||
install -v -d -m 1777 $(DESTDIR)/tmp $(DESTDIR)/var/tmp
|
install -v -d -m 1777 $(DESTDIR)/tmp $(DESTDIR)/var/tmp
|
||||||
|
|
||||||
|
etc: base
|
||||||
|
@ln -sv /proc/mounts $(DESTDIR)/etc/mtab
|
||||||
|
|
||||||
|
lib: usr
|
||||||
|
@ln -sv lib $(DESTDIR)/lib64 && \
|
||||||
|
ln -sv lib $(DESTDIR)/usr/lib64
|
||||||
|
|
||||||
|
snap: usr
|
||||||
|
install -v -d -m 0755 $(DESTDIR)/usr/share/snap-base && \
|
||||||
|
install -v -m 0644 bashrc $(DESTDIR)/usr/share/snap-base/bashrc && \
|
||||||
|
install -v -m 0644 group $(DESTDIR)/usr/share/snap-base/group && \
|
||||||
|
install -v -m 0644 passwd $(DESTDIR)/usr/share/snap-base/passwd && \
|
||||||
|
install -v -m 0644 profile $(DESTDIR)/usr/share/snap-base/profile && \
|
||||||
|
install -v -m 0644 snap.conf \
|
||||||
|
$(DESTDIR)/usr/share/snap-base/snap.conf && \
|
||||||
|
install -v -m 0644 snap_version $(DESTDIR)/etc/snap_version
|
||||||
|
|
||||||
usr: base
|
usr: base
|
||||||
@install -v -d -m 0755 -o root -g root \
|
@install -v -d -m 0755 -o root -g root \
|
||||||
$(DESTDIR)/usr/{,local/}{bin,include,lib,sbin,src} && \
|
$(DESTDIR)/usr/{,local/}{bin,include,lib,sbin,src} && \
|
||||||
@@ -27,11 +44,3 @@ var: base
|
|||||||
ln -sv /run $(DESTDIR)/var/run && \
|
ln -sv /run $(DESTDIR)/var/run && \
|
||||||
ln -sv /run/lock $(DESTDIR)/var/lock
|
ln -sv /run/lock $(DESTDIR)/var/lock
|
||||||
|
|
||||||
lib: usr
|
|
||||||
@ln -sv lib $(DESTDIR)/lib64 && \
|
|
||||||
ln -sv lib $(DESTDIR)/usr/lib64
|
|
||||||
|
|
||||||
snap: usr
|
|
||||||
install -v -d -m 0755 $(DESTDIR)/usr/share/snap-base && \
|
|
||||||
install -v -m 0644 usr/share/snap-base/* $(DESTDIR)/usr/share/snap-base
|
|
||||||
|
|
||||||
|
|||||||
2
SRC/snap-base/snap.conf
Normal file
2
SRC/snap-base/snap.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[sources]
|
||||||
|
default = http://packages.snaplinux.org/ core dev main
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[sources]
|
|
||||||
default = http://packages.snaplinux.org/ core dev util
|
|
||||||
Reference in New Issue
Block a user