Skip to content

Commit

Permalink
fix: 打包
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhldr committed Nov 22, 2024
1 parent 521e5aa commit bf72ea3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ test-deb: clear
sed 's/any/amd64/g' ./control > ./deb/DEBIAN/control && \
dpkg -b deb ./deb/lfy-${VERSION}-x86_64.deb && \
cd deb && \
mv ./*.deb ${DISK}/${BUILD_TYPE}/
mv lfy-${VERSION}-x86_64.deb ${DISK}/lfy-${VERSION}-x86_64-${BUILD_TYPE}.deb


test-flatpak:clear
meson setup build -Dbuild_type=gtk
meson setup build -Dbuild_type=${BUILD_TYPE}
cd ${BUILD_PKG}/flatpak && \
flatpak-builder --repo=repo build-dir cool.ldr.lfy.yaml && \
flatpak build-bundle repo cool.ldr.lfy-${VERSION}.flatpak cool.ldr.lfy && \
flatpak install -y --user cool.ldr.lfy-${VERSION}.flatpak && \
mv cool.ldr.lfy-${VERSION}.flatpak ${DISK}/gtk
mv cool.ldr.lfy-${VERSION}.flatpak ${DISK}/cool.ldr.lfy-${VERSION}-${BUILD_TYPE}.flatpak


test-aur: clear test-zip
Expand All @@ -85,7 +85,7 @@ test-aur: clear test-zip
cd ${BUILD_PKG}/aur && \
cp /tmp/v${VERSION}.zip ./ && \
makepkg -sf && \
mv *.zst ${DISK}/${BUILD_TYPE}/
mv lfy-${VERSION}-1-any.pkg.tar.zst ${DISK}/lfy-${VERSION}-1-any-${BUILD_TYPE}.pkg.tar.zst


test-rpm: clear test-zip
Expand All @@ -97,15 +97,16 @@ test-rpm: clear test-zip

rpmbuild -bb ${PWD}/${BUILD_PKG}/rpm/SPECS/lfy.spec --define "_topdir ${PWD}/${BUILD_PKG}/rpm/"
cd ${BUILD_PKG}/rpm/ && \
mv RPMS/x86_64/*.rpm ${DISK}/${BUILD_TYPE}/
mv RPMS/x86_64/lfy-${VERSION}-1.x86_64.rpm ${DISK}/lfy-${VERSION}-1.x86_64-${BUILD_TYPE}.rpm

release:
make test-aur
make test-deb
make test-rpm
make BUILD_TYPE=gtk test-aur
make BUILD_TYPE=gtk test-deb
make BUILD_TYPE=gtk test-rpm
# make BUILD_TYPE=gtk test-flatpak
make BUILD_TYPE=gtk test-flatpak

uninstall:
cd build && ninja uninstall

0 comments on commit bf72ea3

Please sign in to comment.