Skip to content

Commit

Permalink
Update ScAPI for version from Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
veriktig committed Jul 4, 2024
1 parent 5322742 commit 2365394
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 33 deletions.
12 changes: 10 additions & 2 deletions ScAPI/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ CLASSPATH=../ScLauncher/generated/ScLauncher-1.0.0.jar

BUNDLE_NAME=ScAPI
BUNDLE_VERSION=1.2.0
SYMBOLIC_NAME=com.veriktig.scandium.api

FILELIST=src_list
OUTPUT=generated/classes
JAR=generated/ScAPI-${BUNDLE_VERSION}.jar

all: install

list:
version:
cd src; cat MANIFEST.template | sed -e "s/__SCAPI_NAME__/${SYMBOLIC_NAME}/" > MANIFEST.name
cd src; cat MANIFEST.name | sed -e "s/__SCAPI_VERSION__/${BUNDLE_VERSION}/" > MANIFEST.fragment
cd src; rm MANIFEST.name

list: version
find -L ./src/main/java -name \*.java -print > ${FILELIST}

compile: list
Expand All @@ -26,8 +32,10 @@ deps: jar
${RM} -rf generated/MANIFEST.osgi
${RM} -rf src/main/resources/META-INF/MANIFEST.MF
java -jar ../external/jdepz/jdepz.jar --osgi ${BUNDLE_VERSION} ${JAR} > generated/MANIFEST.osgi
cat src/MANIFEST.template generated/MANIFEST.osgi > src/main/resources/META-INF/MANIFEST.MF
cat src/MANIFEST.fragment generated/MANIFEST.osgi > src/main/resources/META-INF/MANIFEST.MF
jar --update --file ${JAR} -m src/main/resources/META-INF/MANIFEST.MF
cd src; rm MANIFEST.fragment
cd src/main/resources/META-INF; rm MANIFEST.MF

clean: deps
cd src; ${RM} -rf com
Expand Down
4 changes: 2 additions & 2 deletions ScAPI/src/MANIFEST.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Bundle-ManifestVersion: 2
Bundle-Name: ScAPI
Bundle-SymbolicName: com.veriktig.scandium.api
Bundle-Version: 1.2.0
Bundle-SymbolicName: __SCAPI_NAME__
Bundle-Version: __SCAPI_VERSION__
Bundle-Activator: com.veriktig.scandium.api.Activator
29 changes: 0 additions & 29 deletions ScAPI/src/main/resources/META-INF/MANIFEST.MF

This file was deleted.

1 change: 1 addition & 0 deletions ScLauncher/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jar: compile
deps: jar
cat src/MANIFEST.template > src/main/resources/META-INF/MANIFEST.MF
jar --update --file ${JAR} -m src/main/resources/META-INF/MANIFEST.MF
cd ../external/felix-dev/framework/src/main/java/org/apache/felix/framework/util; rm FelixConstants.java

clean: deps
${RM} -rf src/main/resources/META-INF/MANIFEST.MF
Expand Down

0 comments on commit 2365394

Please sign in to comment.