@@ -11,36 +11,35 @@ INITIAL_FOLDER=$(pwd)
1111SHARE_FOLDER=$INSTALL_ROOT /share/asn1scc
1212BIN_FOLDER=$INSTALL_ROOT /bin
1313cd ..
14- VERSION=3.2.$( cat Asn1f2/SvnVersion.cs | cut -d \" -f 2)
15- echo Creating a Debian package for ASN1Scc version $VERSION
16- test -f Asn1f2/bin/Debug/Asn1f2.exe || (echo ' Run ./build.sh first to build ASN1SCC' && false)
17- rm -rf asn1scc
18- mkdir -p asn1scc/DEBIAN
19- mkdir -p asn1scc/$BIN_FOLDER
20- mkdir -p asn1scc/$SHARE_FOLDER
21- cp -r Asn1f2/bin/Debug/* asn1scc/$SHARE_FOLDER /
22- rm -f asn1scc/$SHARE_FOLDER /* .mdb
23- mv asn1scc/$SHARE_FOLDER /Asn1f2.exe asn1scc/$SHARE_FOLDER /asn1.exe
24- cd asn1scc/$BIN_FOLDER
25- ln -s ../share/asn1scc/* .
14+ BINARY_PATH=./asn1scc/bin/Release/net7.0/linux-x64/publish
15+ VERSION=" $( ${BINARY_PATH} /asn1scc -v | head -1 | awk ' {print $NF}' ) "
16+ echo " [-] Creating a Debian package for ASN1SCC version ${VERSION} "
17+ test -f ${BINARY_PATH} /asn1scc || (echo ' You must first build ASN1SCC (make -C .. -f Makefile.debian publish)' && false)
18+ rm -rf asn1scc_deb
19+ mkdir -p asn1scc_deb/DEBIAN
20+ mkdir -p asn1scc_deb/$BIN_FOLDER
21+ mkdir -p asn1scc_deb/$SHARE_FOLDER
22+ cp -r ${BINARY_PATH} /* asn1scc_deb/$SHARE_FOLDER /
23+ cd asn1scc_deb/$BIN_FOLDER
24+ ln -s ../share/asn1scc/asn1scc .
2625cd $INITIAL_FOLDER /..
2726echo " Package: asn1scc
2827Version: ${VERSION}
2928Section: base
3029Priority: optional
3130Architecture: all
32- Depends: libmono-system-runtime4.0-cil,libmono-corlib4.0-cil,libmono-system-runtime-serialization-formatters-soap4.0-cil, libmono-system-web4.0-cil,libmono-system-xml4.0-cil,libmono-system4.0-cil,mono-runtime,libmono-system-numerics4.0-cil,libmono-system-data-linq4.0-cil,libmono-corlib2.0-cil,libmono-system2.0-cil,libmono-corlib4.5-cil
33- Maintainer: Thanassis Tsiodras
34- Description: ASN.1 Space Certified Compiler - Generate Spark/Ada and C code for ASN.1 uPER or custom binary encoders/decoders
35- Homepage: http://github.com/maxime- esa/asn1scc" > asn1scc /DEBIAN/control
31+ Depends:
32+ Maintainer: George Mamais
33+ Description: ASN.1 Space Certified Compiler - Generate Spark/Ada/Scala/ C code for ASN.1 uPER or custom binary encoders/decoders
34+ Homepage: http://github.com/esa/asn1scc" > asn1scc_deb /DEBIAN/control
3635echo ' #!/bin/sh
3736echo "All done!"
38- ' >> asn1scc /DEBIAN/postinst
39- chmod +x asn1scc /DEBIAN/postinst
40- dpkg-deb --build asn1scc
37+ ' >> asn1scc_deb /DEBIAN/postinst
38+ chmod +x asn1scc_deb /DEBIAN/postinst
39+ dpkg-deb --build asn1scc_deb
4140cd $INITIAL_FOLDER
4241mv ../* .deb .
43- rm -rf ../asn1scc
44- echo -e ' Done...\n\nThe .deb file is here:\n'
42+ rm -rf ../asn1scc_deb
43+ echo -e ' [-] Done...\n\nThe .deb file is here:\n'
4544pwd
4645ls -l * deb
0 commit comments