2023-01-29 00:26:23 -06:00
|
|
|
.PHONY: control
|
|
|
|
|
2023-01-29 00:57:35 -06:00
|
|
|
VERSION=221118-e58fee0fb
|
2023-01-29 00:26:23 -06:00
|
|
|
BASENAME=photoprism
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo
|
|
|
|
@echo "make all # to attempt to download, extract and build the .deb package using dpkg"
|
|
|
|
@echo
|
|
|
|
|
|
|
|
all: download clean extract DEBIAN build
|
|
|
|
|
2023-01-29 00:32:45 -06:00
|
|
|
build-dep:
|
|
|
|
apt install tensorflow # this isn't actually packaged
|
|
|
|
git clone https://github.com/photoprism/photoprism.git
|
|
|
|
dd photoprism
|
|
|
|
git checkout release
|
|
|
|
sudo make all
|
|
|
|
sudo ./scripts/build.sh prod /opt/photoprism/bin/photoprism
|
|
|
|
sudo cp -a assets/ /opt/photoprism/assets
|
|
|
|
# now follow instructions for adduser, postgresql, etc:
|
|
|
|
# https://github.com/IndrekHaav/photoprism-debian
|
2023-01-29 00:26:23 -06:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf ../files
|
|
|
|
rm -f ../*.deb
|
|
|
|
rm -f ../*.tar.xz data.tar.xz
|
|
|
|
rm -rf DEBIAN
|
|
|
|
|
|
|
|
download:
|
|
|
|
@echo
|
|
|
|
@echo This uses the binary /usr/local/bin/photoprism
|
|
|
|
@echo
|
2023-01-29 00:57:35 -06:00
|
|
|
@echo https://github.com/photoprism/photoprism/releases
|
|
|
|
@echo mkdir ~/go/src/github.com/photoprism; cd ~/go/src/github.com/photoprism/
|
|
|
|
@echo git clone http://github.com/photoprism/photoprism
|
|
|
|
@echo cd photoprims/; go get -v -u ...
|
2023-01-29 00:26:23 -06:00
|
|
|
|
|
|
|
extract:
|
|
|
|
cp -a files ../
|
2023-01-29 00:57:35 -06:00
|
|
|
mkdir -p ../files/opt/
|
|
|
|
cd ../files/opt/ && tar xfz ../../221118-e58fee0fb.tar.gz
|
2023-01-29 00:26:23 -06:00
|
|
|
|
|
|
|
# makes the DEBIAN/ directory
|
|
|
|
DEBIAN:
|
|
|
|
mkdir -p DEBIAN
|
|
|
|
|
|
|
|
# make the md5sum file
|
|
|
|
cd ../files/ && find -type f -exec md5sum '{}' \; |sort -k2 >../md5sums
|
|
|
|
mv ../md5sums DEBIAN/
|
|
|
|
|
|
|
|
# make the control there
|
|
|
|
mkdir -p DEBIAN
|
|
|
|
cp control DEBIAN/
|
|
|
|
# echo Version: ${VERSION} >>DEBIAN/control
|
|
|
|
|
|
|
|
cp postinst DEBIAN
|
|
|
|
|
|
|
|
build:
|
|
|
|
mv DEBIAN ../files/
|
|
|
|
cd .. && dpkg-deb --build files ${BASENAME}_${VERSION}_amd64.deb
|
|
|
|
cd .. && dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|
|
|
|
|
|
|
|
# how to make a debian package "raw" just using tar and ar
|
|
|
|
#
|
|
|
|
# READ THIS AGAIN:
|
|
|
|
#
|
|
|
|
# A .deb file is just output from 'ar rcs'
|
|
|
|
#
|
|
|
|
tar-ar: control
|
|
|
|
cd DEBIAN && tar --ignore-failed-read -cvJf ../control.tar.xz .
|
|
|
|
cd files && tar -cvJf ../data.tar.xz .
|
|
|
|
ar rcs ${BASENAME}_${VERSION}_amd64.deb debian-binary control.tar.xz data.tar.xz
|
|
|
|
dpkg-deb --info ${BASENAME}_${VERSION}_amd64.deb
|