3 Commits

Author SHA1 Message Date
Jay Larson
ab041cd8ef Corrected incorrect DESTDIR variables in usher (should be TARGET) 2017-05-18 19:23:19 -05:00
Jay Larson
4cec71bfbb Added missing /sys to SRC Makefile 2017-05-18 18:46:40 -05:00
Jay Larson
aeb36acc25 The following changes were made:
* moved files out of unnecessasry directories
  * snap_version is now managed by this package
  * added /etc/mtab
  * added /var/log/{btmp,lastlog,wtmp}
2017-05-17 09:17:39 -05:00
10 changed files with 50 additions and 38 deletions

View File

@@ -16,7 +16,7 @@ DESC = Base system directories and files
ARCHIVE :=
SRCDIR := $(PWD)/SRC/snap-base
PATCHDIR := $(PWD)/SRC/patches
VERSION := 0.0alpha1-0
VERSION := 0.0alpha1-3
include /usr/share/snap/Makefile.snaplinux

View File

@@ -7,31 +7,34 @@ case $1 in
exit 0
;;
postinst)
if [[ ${TARGET} ]]; then
if [ ! -f ${TARGET}/etc/bashrc ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/bashrc \
${TARGET}/etc/bashrc
fi
if [ ! -f ${TARGET}/etc/group ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/group \
${TARGET}/etc/group
fi
if [ ! -f ${TARGET}/etc/passwd ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/passwd \
${TARGET}/etc/passwd
fi
if [ ! -f ${TARGET}/etc/profile ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/profile \
${TARGET}/etc/profile
fi
if [ ! -f ${TARGET}/etc/snap.conf ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/snap.conf \
${TARGET}/etc/snap.conf
fi
if [ ! -f ${TARGET}/etc/snap_version ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/snap_version \
${TARGET}/etc/snap_version
fi
if [ ! -f ${TARGET}/etc/bashrc ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/bashrc \
${TARGET}/etc/bashrc
fi
if [ ! -f ${TARGET}/etc/group ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/group \
${TARGET}/etc/group
fi
if [ ! -f ${TARGET}/etc/passwd ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/passwd \
${TARGET}/etc/passwd
fi
if [ ! -f ${TARGET}/etc/profile ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/profile \
${TARGET}/etc/profile
fi
if [ ! -f ${TARGET}/etc/snap.conf ]; then
install -m 0644 ${TARGET}/usr/share/snap-base/snap.conf \
${TARGET}/etc/snap.conf
fi
if [ ! -f ${TARGET}/var/log/btmp ]; then
install -v -m 600 /dev/null ${TARGET}/var/log/btmp
fi
if [ ! -f ${TARGET}/var/log/lastlog ]; then
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
;;
prerm)

View File

@@ -1,14 +1,31 @@
install: base usr var lib snap
install: base usr etc var lib snap
base:
@install -v -d -m 0755 -o root -g root \
$(DESTDIR)/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc} && \
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 \
$(DESTDIR)/root && \
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
@install -v -d -m 0755 -o root -g root \
$(DESTDIR)/usr/{,local/}{bin,include,lib,sbin,src} && \
@@ -27,11 +44,3 @@ var: base
ln -sv /run $(DESTDIR)/var/run && \
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
View File

@@ -0,0 +1,2 @@
[sources]
default = http://packages.snaplinux.org/ core dev main

View File

@@ -1,2 +0,0 @@
[sources]
default = http://packages.snaplinux.org/ core dev util