forked from kuthulux/gnome-connection-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (62 loc) · 2.57 KB
/
Makefile
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
58
59
60
61
62
63
64
65
66
67
68
69
PKG_NAME=gnome-connection-manager
PKG_DESCRIPTION="Simple tabbed ssh and telnet connection manager for GTK+ environments\nMore info in http://kuthulu.com/gcm"
PKG_VERSION=1.2.1
PKG_MAINTAINER="Renzo Bertuzzi <[email protected]>"
PKG_VENDOR=kuthulu.com
PKG_URL=http://kuthulu.com/gcm
PKG_ARCH=all
PKG_ARCH_RPM=noarch
PKG_DEB=${PKG_NAME}_${PKG_VERSION}_${PKG_ARCH}.deb
PKG_RPM=${PKG_NAME}-${PKG_VERSION}.${PKG_ARCH_RPM}.rpm
FPM_OPTS=-s dir -n $(PKG_NAME) -v $(PKG_VERSION) -C $(TMPINSTALLDIR) --maintainer ${PKG_MAINTAINER} --description "$$(printf ${PKG_DESCRIPTION})" -a $(PKG_ARCH) --license GPLv3 --vendor ${PKG_VENDOR} --category net --url ${PKG_URL}
TMPINSTALLDIR=/tmp/$(PKG_NAME)-fpm-install
all : deb rpm
.PHONY : all
#install all files in a temp directory
install: translate
mkdir -p $(DESTDIR)/usr/share/$(PKG_NAME)
mkdir -p $(DESTDIR)/usr/share/applications
mkdir -p $(DESTDIR)/usr/share/doc/$(PKG_NAME)
echo "${PKG_NAME} (${PKG_VERSION}.${PKG_RELEASE}) all; urgency=low" > $(DESTDIR)/usr/share/doc/$(PKG_NAME)/changelog
git log --no-merges --format="* %s" >> $(DESTDIR)/usr/share/doc/$(PKG_NAME)/changelog
gzip -9 $(DESTDIR)/usr/share/doc/$(PKG_NAME)/changelog
cp gnome-connection-manager.desktop $(DESTDIR)/usr/share/applications
cp LICENSE $(DESTDIR)/usr/share/doc/$(PKG_NAME)/copyright
cp -r lang donate.gif gnome_connection_manager.py gnome-connection-manager.glade icon.png pyAES.py SimpleGladeApp.py ssh.expect urlregex.py $(DESTDIR)/usr/share/gnome-connection-manager/
#compile translation files
translate:
msgfmt lang/de_DE.po -o lang/de/LC_MESSAGES/gcm-lang.mo
msgfmt lang/en_US.po -o lang/en/LC_MESSAGES/gcm-lang.mo
msgfmt lang/fr_FR.po -o lang/fr/LC_MESSAGES/gcm-lang.mo
msgfmt lang/it_IT.po -o lang/it/LC_MESSAGES/gcm-lang.mo
msgfmt lang/ko_KO.po -o lang/ko/LC_MESSAGES/gcm-lang.mo
msgfmt lang/pl_PL.po -o lang/pl/LC_MESSAGES/gcm-lang.mo
msgfmt lang/pt_BR.po -o lang/pt/LC_MESSAGES/gcm-lang.mo
msgfmt lang/ru_RU.po -o lang/ru/LC_MESSAGES/gcm-lang.mo
# Generate a deb package using fpm
deb:
rm -rf $(TMPINSTALLDIR)
rm -f $(PKG_DEB)
chmod -R g-w *
make install DESTDIR=$(TMPINSTALLDIR)
fpm -t deb -p $(PKG_DEB) $(FPM_OPTS) \
-d python3 \
-d python3-gi \
-d expect \
--after-install postinst \
--deb-priority optional \
usr
@echo "\033[92mOK: $(PKG_DEB)\033[0m"
# Generate a rpm package using fpm
rpm:
rm -rf $(TMPINSTALLDIR)
rm -f $(PKG_RPM)
chmod -R g-w *
make install DESTDIR=$(TMPINSTALLDIR)
fpm -t rpm -p $(PKG_RPM) $(FPM_OPTS) \
-d python3 \
-d python3-gobject \
-d expect \
--after-install postinst \
usr
@echo "\033[92mOK: $(PKG_RPM)\033[0m"