Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CONFIG-ify package creation process, luna-sysmgr can now be packaged.

'make CONFIG=woce package' from luna-sysmgr should do the trick.

Note:
* The resulting IPK might not work yet, this just fixes ipk creation
* Timestamps aren't done appropriately yet.  Can revisit later.
  • Loading branch information...
commit 88490c690ee1258208062e251fdfe929071299e9 1 parent 9f99bab
Will Dietz dtzWill authored
Showing with 59 additions and 59 deletions.
  1. +31 −31 packages/sysmgr/luna-sysmgr/Makefile
  2. +28 −28 support/package.mk
62 packages/sysmgr/luna-sysmgr/Makefile
View
@@ -39,7 +39,7 @@ QTPATH := $(shell readlink -f $(LEVEL)/packages/sysmgr/qt4/build/armv7)
QMAKE := $(QTPATH)/bin/qmake-palm
.PHONY: build unpack patch package
-package:: ipkgs/${APP_ID}_${VERSION}_armv7.ipk
+package:: ipkgs/${APP_ID}-$(CONFIG)_${VERSION}_armv7.ipk
build:: build/$(CONFIG)/armv7-stage/.built-${VERSION}
unpack: build/$(CONFIG)/.unpacked
@@ -67,51 +67,51 @@ build/$(CONFIG)/armv7-stage/.built-${VERSION}: build/$(CONFIG)/armv7-stage/.conf
### Packaging magic
## TODO: When we revisit packaging, fix this up to do the 'right' thing regarding CONFIG
-build/.built-${VERSION}: build/$(CONFIG)/armv7.built-${VERSION}
+build/$(CONFIG)/.built-${VERSION}: build/$(CONFIG)/armv7.built-${VERSION}
### Headless app packaging fun
-build/%.built-${VERSION}: build/%-stage/.built-${VERSION} ${DL_DIR}/headlessapp-${HEADLESSAPP_VERSION}.tar.gz
- rm -rf build/$*
- mkdir -p build/$*/usr/palm/applications/${APP_ID}
- tar -C build/$*/usr/palm/applications/${APP_ID} -xf ${DL_DIR}/headlessapp-${HEADLESSAPP_VERSION}.tar.gz
- rm -rf build/$*/usr/palm/applications/${APP_ID}/.git
+build/$(CONFIG)/%.built-${VERSION}: build/$(CONFIG)/%-stage/.built-${VERSION} ${DL_DIR}/headlessapp-${HEADLESSAPP_VERSION}.tar.gz
+ rm -rf build/$(CONFIG)/$*
+ mkdir -p build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}
+ tar -C build/$(CONFIG)/$*/usr/palm/applications/${APP_ID} -xf ${DL_DIR}/headlessapp-${HEADLESSAPP_VERSION}.tar.gz
+ rm -rf build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/.git
tar -cf - control | \
- tar -C build/$*/usr/palm/applications/${APP_ID}/ -xf -
- mkdir -p build/$*/usr/palm/applications/${APP_ID}/bin
+ tar -C build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/ -xf -
+ mkdir -p build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/bin
tar -cf - replace.sh restore.sh | \
- tar -C build/$*/usr/palm/applications/${APP_ID}/bin/ -xf -
- tar -C build/$*-stage/release-topaz/ -cf - LunaSysMgr | \
- tar -C build/$*/usr/palm/applications/${APP_ID}/bin/ -xf -
- echo "{" > build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"title\": \"${TITLE}\"," >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"id\": \"${APP_ID}\"," >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"version\": \"${VERSION}\"," >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"vendor\": \"WebOS Ports\"," >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"type\": \"web\"," >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"main\": \"index.html\"," >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"icon\": \"icon.png\"," >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ tar -C build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/bin/ -xf -
+ tar -C build/$(CONFIG)/$*-stage/release-topaz/ -cf - LunaSysMgr | \
+ tar -C build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/bin/ -xf -
+ echo "{" > build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"title\": \"${TITLE}\"," >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"id\": \"${APP_ID}\"," >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"version\": \"${VERSION}\"," >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"vendor\": \"WebOS Ports\"," >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"type\": \"web\"," >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"main\": \"index.html\"," >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"icon\": \"icon.png\"," >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
ifdef APPINFO_DESCRIPTION
- echo '"message": "${APPINFO_DESCRIPTION}",' >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo '"message": "${APPINFO_DESCRIPTION}",' >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
endif
ifdef APPINFO_CHANGELOG
- echo '"changeLog": ${APPINFO_CHANGELOG},' >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo '"changeLog": ${APPINFO_CHANGELOG},' >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
endif
- echo '"uiRevision": "2",' >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "\"noWindow\": true" >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
- echo "}" >> build/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo '"uiRevision": "2",' >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "\"noWindow\": true" >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
+ echo "}" >> build/$(CONFIG)/$*/usr/palm/applications/${APP_ID}/appinfo.json
touch $@
### CONTROL files
-build/%/CONTROL/postinst:
+build/$(CONFIG)/%/CONTROL/postinst:
rm -f $@
- mkdir -p build/$*/CONTROL
- install -m 0775 control/postinst build/$*/CONTROL
+ mkdir -p build/$(CONFIG)/$*/CONTROL
+ install -m 0775 control/postinst build/$(CONFIG)/$*/CONTROL
chmod ugo+x $@
-build/%/CONTROL/prerm:
+build/$(CONFIG)/%/CONTROL/prerm:
rm -f $@
- mkdir -p build/$*/CONTROL
- install -m 0775 control/prerm build/$*/CONTROL
+ mkdir -p build/$(CONFIG)/$*/CONTROL
+ install -m 0775 control/prerm build/$(CONFIG)/$*/CONTROL
chmod ugo+x $@
clobber::
56 support/package.mk
View
@@ -36,57 +36,57 @@ ifndef CATEGORY
PREWARE_SANITY += $(error "Please define CATEGORY in your Makefile")
endif
-ipkgs/${APP_ID}_${VERSION}_%.ipk: build/.built-${VERSION}
- rm -f ipkgs/${APP_ID}_${VERSION}_$*.ipk
- rm -f build/$*/CONTROL/conffiles
- ${MAKE} build/$*/CONTROL/conffiles
- rm -f build/$*/CONTROL/control
- ${MAKE} build/$*/CONTROL/control
- rm -f build/$*/CONTROL/postinst
- ${MAKE} build/$*/CONTROL/postinst
- rm -f build/$*/CONTROL/prerm
- ${MAKE} build/$*/CONTROL/prerm
- rm -f build/$*/CONTROL/conffiles
- ${MAKE} build/$*/CONTROL/conffiles
+ipkgs/${APP_ID}-${CONFIG}_${VERSION}_%.ipk: build/$(CONFIG)/.built-${VERSION}
+ rm -f ipkgs/${APP_ID}-${CONFIG}_${VERSION}_$*.ipk
+ rm -f build/$(CONFIG)/$*/CONTROL/conffiles
+ ${MAKE} build/$(CONFIG)/$*/CONTROL/conffiles
+ rm -f build/$(CONFIG)/$*/CONTROL/control
+ ${MAKE} build/$(CONFIG)/$*/CONTROL/control
+ rm -f build/$(CONFIG)/$*/CONTROL/postinst
+ ${MAKE} build/$(CONFIG)/$*/CONTROL/postinst
+ rm -f build/$(CONFIG)/$*/CONTROL/prerm
+ ${MAKE} build/$(CONFIG)/$*/CONTROL/prerm
+ rm -f build/$(CONFIG)/$*/CONTROL/conffiles
+ ${MAKE} build/$(CONFIG)/$*/CONTROL/conffiles
mkdir -p ipkgs
- if [ -n "${SIGNER}" ] && [ -e $(LEVEL)/../sign/${SIGNER}.crt ] && [ -e $(LEVEL)/../sign/${SIGNER}.key ] ; then \
- ( cd build ; \
+ if [ -n "${SIGNER}" ] && [ -e $(LEVEL)/../../sign/${SIGNER}.crt ] && [ -e $(LEVEL)/../../sign/${SIGNER}.key ] ; then \
+ ( cd build/$(CONFIG) ; \
TAR_OPTIONS="--wildcards --mode=g-s" \
- $(LEVEL)/../toolchain/ipkg-utils/ipkg-build -o 0 -g 0 ${BLDFLAGS} \
- -s $(shell cd $(LEVEL)/.. ; pwd)/sign/${SIGNER}.crt -k $(shell cd $(LEVEL)/.. ; pwd)/sign/${SIGNER}.key \
+ $(LEVEL)/../../toolchain/ipkg-utils/ipkg-build -o 0 -g 0 ${BLDFLAGS} \
+ -s $(shell cd $(LEVEL)/../.. ; pwd)/sign/${SIGNER}.crt -k $(shell cd $(LEVEL)/../.. ; pwd)/sign/${SIGNER}.key \
$* ) ; \
else \
- ( cd build ; \
+ ( cd build/$(CONFIG) ; \
TAR_OPTIONS="--wildcards --mode=g-s" \
- $(LEVEL)/../toolchain/ipkg-utils/ipkg-build -o 0 -g 0 ${BLDFLAGS} $* ) ; \
+ $(LEVEL)/../../toolchain/ipkg-utils/ipkg-build -o 0 -g 0 ${BLDFLAGS} $* ) ; \
fi
- mv build/${APP_ID}_${VERSION}_$*.ipk $@
+ mv build/$(CONFIG)/${APP_ID}_${VERSION}_$*.ipk $@
-build/%/CONTROL/postinst:
+build/$(CONFIG)/%/CONTROL/postinst:
if [ -e control/postinst ] ; then \
install -m 755 control/postinst $@ ; \
fi
-build/%/CONTROL/prerm:
+build/$(CONFIG)/%/CONTROL/prerm:
if [ -e control/prerm ] ; then \
install -m 755 control/prerm $@ ; \
fi
-build/%/CONTROL/conffiles:
+build/$(CONFIG)/%/CONTROL/conffiles:
if [ -e control/conffiles ] ; then \
install -m 755 control/conffiles $@ ; \
fi
ifeq ("${TYPE}", "Application")
-build/%/CONTROL/control: build/%/usr/palm/applications/${APP_ID}/appinfo.json
+build/${CONFIG}/%/CONTROL/control: build/${CONFIG}/%/usr/palm/applications/${APP_ID}/appinfo.json
else ifdef SRC_OPTWARE
-build/%/CONTROL/control: build/%.control
+build/${CONFIG}/%/CONTROL/control: build/${CONFIG}/%.control
else
-build/%/CONTROL/control: /dev/null
+build/${CONFIG}/%/CONTROL/control: /dev/null
endif
$(call PREWARE_SANITY)
rm -f $@
- mkdir -p build/$*/CONTROL
+ mkdir -p build/${CONFIG}/$*/CONTROL
echo "Package: ${APP_ID}" > $@
/bin/echo -n "Version: " >> $@
ifdef VERSION
@@ -169,7 +169,7 @@ ifdef CATEGORY
endif
ifdef SRC_IPKG
/bin/echo -n ", \"LastUpdated\":\"" >> $@
- $(LEVEL)/scripts/timestamp.py ${DL_DIR}/${APP_ID}_${VERSION}_all.ipk >> $@
+ $(LEVEL)/scripts/timestamp.py ${DL_DIR}/${APP_ID}-${CONFIG}_${VERSION}_all.ipk >> $@
/bin/echo -n "\"" >> $@
else ifdef SRC_TGZ
/bin/echo -n ", \"LastUpdated\":\"" >> $@
@@ -258,4 +258,4 @@ clobber::
.PHONY: clean
clean::
- rm -rf build/src build/src-* build/arm build/armv6 build/armv7 build/i686
+ rm -rf build/$(CONFIG)/src build/$(CONFIG)/src-* build/$(CONFIG)/arm build/$(CONFIG)/armv6 build/$(CONFIG)/armv7 build/$(CONFIG)/i686
Please sign in to comment.
Something went wrong with that request. Please try again.