appliances/assp/Makefile

27 lines
1.3 KiB
Makefile
Raw Permalink Normal View History

2022-08-05 19:00:35 +02:00
install_assp = /opt/assp
assp.service = $(CHROOT)/lib/systemd/system/assp.service
ASSP_SNAPSHOT ?= r325
ASSP_MOD_INST_VER ?= 2.10
ASSP_FC_VER ?= 1.05
ASSP_ZIP = assp-svn-$(ASSP_SNAPSHOT).zip
ASSP_URL = https://sourceforge.net/code-snapshots/svn/a/as/assp/svn/$(ASSP_ZIP)
$(CHROOT)$(install_assp):
RUN test -f /var/cache/distfiles/$(ASSP_ZIP) || \
RUN wget $(ASSP_URL) -O /var/cache/distfiles/$(ASSP_ZIP)
RUN sh -c '(echo y;echo manual;echo o conf prerequisites_policy follow;echo o conf commit)|cpan'
RUN sh -c 'cd /opt && unzip /var/cache/distfiles/$(ASSP_ZIP) && mv /opt/assp-svn-$(ASSP_SNAPSHOT)/assp2/trunk $(install_assp) && rm -rf /opt/assp-svn-$(ASSP_SNAPSHOT)'
echo "AsADaemon:=1" > $(CHROOT)$(install_assp)/assp.cfg
RUN sh -c 'mkdir -p /tmp/mod_inst && cd /tmp/mod_inst && unzip $(install_assp)/mod_inst.pl.$(ASSP_MOD_INST_VER).zip && perl mod_inst.pl && perl mod_inst_ocr.pl'
RUN sh -c 'cd $(install_assp) && unzip images/images.zip && rm images/images.zip'
RUN sh -c 'cd $(install_assp) && unzip filecommander/$(ASSP_FC_VER).ZIP && rm -rf filecommander/$(ASSP_FC_VER).ZIP && mv $(ASSP_FC_VER)/images/* images/ && mv $(ASSP_FC_VER)/lib/* lib/ && rm -rf $(ASSP_FC_VER)'
rm -rf $(CHROOT)/root/.cpan/build $(CHROOT)/root/.cpan/sources
$(assp.service): assp/assp.service
cp $< $@
preinstall:
postinstall: $(CHROOT)$(install_assp) $(assp.service)