Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ############
- # PKGBUILD file for the Concentrador SG project package.
- #############
- pkgname="concentrador"
- # This field will be filled by the pkgver() function
- pkgver=0.9b
- # Unfortunatly this field is mandatory by the makepkg
- pkgrel=1
- pkgdesc="Smartgreen gateway services and configurations"
- arch="any"
- url="http://repositorio.smartgreen.net.br/network/concentrador"
- license="unknown"
- depends=('iw' 'wireless_tools' 'nginx' 'hostapd' 'dhcp' 'wpa_supplicant' \
- 'openvpn' 'htop' 'vim' 'picocom' 'iputils' 'openvpn' 'usb_modeswitch' 'wvdial' \
- 'python2-pyserial' 'python2-pip' 'python2-tornado' 'python2-setuptools' 'gcc' \
- 'python2-psutil' 'python2-netifaces' 'python2-sensors' 'python2-pyudev' \
- 'i2c-tools')
- makedepends="git"
- provides="${pkgname}"
- conflicts="${pkgname}"
- # Files to be backuped when upgrading (.pacnew) or removing (.pacsave) the
- # package installed.
- backup=('etc/wvdial.conf' 'etc/mobile/mobile.conf' \
- 'etc/modprobe.d/bcmdhd-op.conf' 'etc/systemd/timesyncd.conf' \
- 'etc/systemd/system/ap-sg.conf' 'etc/systemd/journald.conf' \
- 'etc/modules-load.d/bcmdhd.conf' 'etc/hostapd/hostapd.conf' \
- 'etc/openvpn/client.conf' 'etc/dhcpd.conf' 'etc/nginx/nginx.conf' \
- 'etc/sgcon/legacy.conf' 'etc/sgcon/appliance.conf' 'etc/sgcon/suite.conf' \
- 'etc/sgcon/monitor.conf' 'etc/sgcon/network.conf' 'etc/sgcon/serial.conf' \
- 'etc/dhcpcd.conf' 'etc/pacman.conf')
- # Source diretcly from git repository
- source="git+http://repositorio.smartgreen.net.br/network/concentrador.git"
- # As the source is in continuous modification the md5 check will be skiped for
- # now
- md5sums="SKIP"
- # This will take the version number from the last tag commited
- pkgver() {
- cd ${pkgname}
- git describe --long | cut -d '-' -f 1
- }
- # Defines where the files must be located after installation
- package() {
- cd ${srcdir}/${pkgname}
- # Create respective fakeroot folders
- mkdir -p ${pkgdir}/etc
- mkdir -p ${pkgdir}/home/concentrador/redes
- mkdir -p ${pkgdir}/root
- # Specific 'concentrador' user's home folder access permission
- chmod 700 ${pkgdir}/home/concentrador
- # Specific 'root' user's folder access permission
- chmod 750 ${pkgdir}/root
- # Copy all files to its respective folders during installation process
- cp -r linux-config/archlinux/etc/* ${pkgdir}/etc/
- cp -r * ${pkgdir}/home/concentrador/redes/
- cp linux-config/archlinux/config_sgcon.sh ${pkgdir}/root/
- # Change ownership to the 'concentrador' user (UID 1000)
- chown -R 1000:1000 ${pkgdir}/home/concentrador/redes
- }
Advertisement
Add Comment
Please, Sign In to add comment