Use quotes and ${} syntax.
Remove unnecessary reference to $srcdir.

makepkg automatically places you in $srcdir.
Remove explicit return 1's.

makepkg will automatically stop and fail on any failed command.  There
is no need to manually return 1.
Create separate package() function.

package() is actually a required function according to the docs.  The
actual install should take place here, not in build().