# Installation Details
###############################################################################
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
- for i in $$(ls -1 $(DIR_SRC)/config/rootfiles/core) ; do \
- if [ "$$i" == "files" ]; then continue; fi; \
- rm -rf /install/packages/package; \
- mkdir -p /install/packages/package && \
- eval $$(cat /usr/src/config/rootfiles/core/$$i/meta) \
- && cp -f /usr/src/config/rootfiles/core/$$i/update.sh /install/packages/package \
- && cp -f /usr/src/config/rootfiles/core/$$i/files /install/packages/package/ROOTFILES \
- && chmod 755 /install/packages/package/update.sh \
- && cd / \
- && tar -cf /install/packages/package/files --files-from=/install/packages/package/ROOTFILES --exclude='#*' \
- && cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES; \
- cd /install/packages/package && tar cf ../core-update-$(VERSION)-$$i.ipfire \
- --files-from=/usr/src/config/rootfiles/core/files && \
- rm -rf /install/packages/package; \
- sed -e "s/NAME/core-update/g" \
+CORE = $(patsubst $(DIR_SRC)/config/rootfiles/%,%,$(wildcard $(DIR_SRC)/config/rootfiles/core/*))
+
+$(TARGET) : $(CORE)
+
+core/%:
+ rm -rf /install/packages/package
+ mkdir -p /install/packages/package
+ eval $$(cat /usr/src/config/rootfiles/$@/meta)
+ cp -f /usr/src/config/rootfiles/$@/update.sh /install/packages/package
+ cp -f /usr/src/config/rootfiles/$@/files /install/packages/package/ROOTFILES
+ chmod 755 /install/packages/package/update.sh
+ cd / && tar cf /install/packages/package/files --files-from=/install/packages/package/ROOTFILES --exclude='#*'
+ -cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES
+ cd /install/packages/package && tar cf ../core-upgrade-$(VERSION)-$$(basename $@).ipfire \
+ update.sh files ROOTFILES
+ rm -rf /install/packages/package
+ sed -e "s/NAME/core-upgrade/g" \
-e "s/VER/$(VERSION)/g" \
- -e "s/RELEASE/$$i/g" \
+ -e "s/RELEASE/$$(basename $@)/g" \
-e "s/DEPS/$(DEPS)/g" \
-e "s/DESCDE/$(DESCDE)/g" \
-e "s/DESCEN/$(DESCEN)/g" \
- -e "s/SIZE/`ls -l \/install\/packages\/core-update-$(VERSION)-$$i.ipfire | awk '{ print \$5 }'`/g" \
- < /usr/src/src/pakfire/meta > /install/packages/meta-core-update-$$i; \
- done
+ -e "s/SIZE/`ls -l \/install\/packages\/core-upgrade-$(VERSION)-$$(basename $@).ipfire | awk '{ print $$5 }'`/g" \
+ < /usr/src/src/pakfire/meta > /install/packages/meta-core-upgrade-$$(basename $@)
fprintf(flog, ", boot = %ld, swap = %ld, mylog = %ld, root = %ld\n",
boot_partition, swap_file, system_partition, root_partition);
+ rc = 0;
- if ( (!unattended) && (((disk - (root_partition + swap_file + boot_partition)) < 256 ) && ((disk - (root_partition + boot_partition + 32 )) > 256)) ) {
+ if ( (!unattended) && (((disk - (root_partition + swap_file + boot_partition)) < 256 ) && ((disk - (root_partition + boot_partition )) > 256)) ) {
rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL], ctr[TR_CONTINUE_NO_SWAP]);
- if (rc != 0){
- swap_file = 32;
+ if (rc == 1){
+ swap_file = 0;
system_partition = disk - ( root_partition + swap_file + boot_partition );
- fprintf(flog, "Changing Swap Size to 32 MB.\n");
+ fprintf(flog, "Changing Swap Size to 0 MB.\n");
}
- else {
+ else if (rc == 2){
fprintf(flog, "Disk is too small.\n");
errorbox(ctr[TR_DISK_TOO_SMALL]);goto EXIT;
}
handle = fopen("/tmp/partitiontable", "w");
/* Make swapfile */
- if (swap_file) {
- fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
- boot_partition, swap_file, root_partition);
- } else {
- fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
- boot_partition, root_partition);
- }
+ if (swap_file) {
+ fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
+ boot_partition, swap_file, root_partition);
+ } else {
+ fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
+ boot_partition, root_partition);
+ }
fclose(handle);