Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 58 lines (47 sloc) 1.769 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
ARCH = $(shell uname -m)
PKGNAME = $(APP)-$(REVISION)-osx-$(ARCH).tar.gz
DMGNAME = rcouchx-$(REVISION).dmg
ZIPNAME = rcouchx-$(REVISION).zip
DMGFOLDER = packages/$(APP)-$(REVISION)

# simply tar up the rel directory and sha the file
build: clean buildrel
@echo "Building package $(PKGNAME)"
mkdir -p packages
cd $(BUILDDIR)/$(APP)-$(REVISION) && \
cp -R rel/rcouch $(APP)-$(REVISION) && \
tar -czf ../../packages/$(PKGNAME) $(APP)-$(REVISION)
cd packages && \
for tarfile in `ls *.gz`; do \
shasum -a 256 $${tarfile} > $${tarfile}.sha \
; reldone

dmg: cleanrcouchx buildrcouchx
@echo "Building package $(PKGNAME)"
mkdir -p packages
cp -f osx/README.txt $(BUILDDIR)/$(APP)-$(REVISION)/
cp -f ../LICENSE $(BUILDDIR)/$(APP)-$(REVISION)/LICENSE.txt
cp -f osx/dmg-background.png $(BUILDDIR)/$(APP)-$(REVISION)
cp -f osx/setviewoptions.applescript $(BUILDDIR)/$(APP)-$(REVISION)
cp -f osx/makedmg.sh $(BUILDDIR)/$(APP)-$(REVISION)/
cp -f "../contrib/rcouchx/rcouch.icns" $(BUILDDIR)/$(APP)-$(REVISION)/
(cd $(BUILDDIR)/$(APP)-$(REVISION) && \
./makedmg.sh "$(DMGNAME)" "rcouchx.app" "rcouchx" dmg-background.png rcouch.icns)
cp -f $(BUILDDIR)/$(APP)-$(REVISION)/$(DMGNAME) packages/
cd packages && \
zip $(ZIPNAME) $(DMGNAME)
cd packages && \
shasum -a 256 $(ZIPNAME) > $(ZIPNAME).sha

clean:
@rm -rf $(BUILDDIR)

cleanrcouchx: clean
@rm -rf packages

# Build the release we need to package
buildrel: $(BUILDDIR)/$(APP)-$(REVISION)
cd $^ && $(MAKE) deps compile rel


buildrcouchx: $(BUILDDIR)/$(APP)-$(REVISION)
cd $^ && $(MAKE) deps rcouchx

$(BUILDDIR)/$(APP)-$(REVISION): $(BUILDDIR) $(APP)-$(REVISION).tar.gz
tar xz -C $(BUILDDIR) -f $(APP)-$(REVISION).tar.gz

$(BUILDDIR):
mkdir -p $@

$(PKGERDIR)/pkgclean:
@echo
Something went wrong with that request. Please try again.