First check in
This commit is contained in:
79
Makefile
Normal file
79
Makefile
Normal file
@@ -0,0 +1,79 @@
|
||||
# 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.
|
||||
|
||||
ARCH = x86_64
|
||||
DEPENDS = dash,glibc
|
||||
BUILDDEPS =
|
||||
URL = http://ftp.isc.org/isc/cron/
|
||||
REPO = main
|
||||
BRIEF = daemon to execute scheduled commands
|
||||
DESC = An implimentation of cron based on the SysV cron (aka Vixie cron)
|
||||
SNAPVER = 0
|
||||
|
||||
ARCHIVE := $(PWD)/$(shell ls SRC/*.shar|tail -1)
|
||||
SRCDIR := cron-$(shell echo $(ARCHIVE)|egrep -o '[0-9]\.[0-9]')
|
||||
PATCHDIR := $(PWD)/SRC/patches
|
||||
VERSION := $(shell echo $(SRCDIR)|egrep -o '[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
$(SRCDIR)/Makefile: $(ARCHIVE)
|
||||
@install -v -d $(SRCDIR) ./ && \
|
||||
cd $(SRCDIR) && sh $(ARCHIVE)
|
||||
@touch $(SRCDIR)/Makefile
|
||||
|
||||
$(SRCDIR)/cron: $(SRCDIR)/Makefile
|
||||
@cd $(SRCDIR) && \
|
||||
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
|
||||
patch --verbose -Np1 -i $$patch; \
|
||||
done
|
||||
@cd $(SRCDIR) && make all
|
||||
|
||||
$(ROOT): $(SRCDIR)/cron
|
||||
@if [ -d $(ROOT) ]; then \
|
||||
touch $(ROOT); \
|
||||
else \
|
||||
mkdir -v $(ROOT); \
|
||||
fi
|
||||
|
||||
@install -v -m 0755 -d $(ROOT)/bin && \
|
||||
install -v -m 0755 -d $(ROOT)/etc && \
|
||||
install -v -m 0755 -d $(ROOT)/etc/cron.hourly && \
|
||||
install -v -m 0755 -d $(ROOT)/etc/cron.d && \
|
||||
install -v -m 0755 -d $(ROOT)/etc/cron.daily && \
|
||||
install -v -m 0755 -d $(ROOT)/etc/cron.monthly && \
|
||||
install -v -m 0755 -d $(ROOT)/etc/cron.weekly && \
|
||||
install -v -m 0755 -d $(ROOT)/etc/default && \
|
||||
install -v -m 0755 -d $(ROOT)/etc/init.d && \
|
||||
install -v -m 0755 -d $(ROOT)/sbin && \
|
||||
install -v -m 0755 -d $(ROOT)/usr/share/cron && \
|
||||
install -v -m 0755 -d $(ROOT)/usr/share/man/man1 && \
|
||||
install -v -m 0755 -d $(ROOT)/usr/share/man/man5 && \
|
||||
install -v -m 0755 -d $(ROOT)/usr/share/man/man8 && \
|
||||
install -v -m 0755 -d $(ROOT)/var/spool/cron && \
|
||||
install -v -m 1730 -d $(ROOT)/var/spool/cron/crontabs && \
|
||||
cd $(SRCDIR) && make install DESTROOT=$(ROOT) DESTDIR=$(ROOT) && \
|
||||
install -v -m 644 crontab.1 $(ROOT)/usr/share/man/man1/crontab.1 && \
|
||||
install -v -m 644 crontab.5 $(ROOT)/usr/share/man/man5/crontab.5 && \
|
||||
install -v -m 644 cron.8 $(ROOT)/usr/share/man/man8/cron.8 && \
|
||||
install -v -m 755 $(SNAPDIR)/cron.init $(ROOT)/etc/init.d/cron
|
||||
install -v -m 600 $(SNAPDIR)/crontab $(ROOT)/usr/share/cron/crontab
|
||||
|
||||
test: $(ROOT)
|
||||
@cd $(SRCDIR); \
|
||||
make check
|
||||
|
||||
clean:
|
||||
@rm -rvf $(ROOT) \
|
||||
$(SNAPINFO) \
|
||||
$(MANIFEST) \
|
||||
$(FILES) \
|
||||
$(SRCDIR)
|
||||
|
||||
Reference in New Issue
Block a user